diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2018-09-05 11:30:40 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2018-09-14 16:42:42 +0300 |
commit | e78e3f6fdc1ca356168422e8babf317d668f9ef2 (patch) | |
tree | a9d83e0cd05c15546dde3ca814074bfa5757663a /map | |
parent | ea3407d1ec6a2800353896fac481023dbc3f4854 (diff) |
Review fixes.
Diffstat (limited to 'map')
-rw-r--r-- | map/framework.cpp | 4 | ||||
-rw-r--r-- | map/gps_track_storage.cpp | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/map/framework.cpp b/map/framework.cpp index 7e2bf8345f..d5d7a6533d 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -392,9 +392,7 @@ Framework::Framework(FrameworkParams const & params) , m_purchase(std::make_unique<Purchase>()) , m_tipsApi(static_cast<TipsApi::Delegate &>(*this)) { - CHECK(IsLittleEndian(), ("Only little endian architecture is supported.")); - - m_startBackgroundTime = my::Timer::LocalTime(); + CHECK(IsLittleEndian(), ("Only little-endian architectures are supported.")); // Editor should be initialized from the main thread to set its ThreadChecker. // However, search calls editor upon initialization thus setting the lazy editor's ThreadChecker diff --git a/map/gps_track_storage.cpp b/map/gps_track_storage.cpp index a2a74041dc..9d63dccf5d 100644 --- a/map/gps_track_storage.cpp +++ b/map/gps_track_storage.cpp @@ -31,7 +31,7 @@ size_t constexpr kPointSize = 8 * sizeof(double) + sizeof(uint8_t); template <typename T> void MemWrite(void * ptr, T value) { - value = SwapIfBigEndian(value); + value = SwapIfBigEndianMacroBased(value); memcpy(ptr, &value, sizeof(T)); } @@ -41,7 +41,7 @@ T MemRead(void const * ptr) { T value; memcpy(&value, ptr, sizeof(T)); - return SwapIfBigEndian(value); + return SwapIfBigEndianMacroBased(value); } void Pack(char * p, location::GpsInfo const & info) @@ -87,7 +87,7 @@ inline size_t GetItemCount(size_t fileSize) inline bool WriteVersion(fstream & f, uint32_t version) { static_assert(kHeaderSize == sizeof(version), ""); - version = SwapIfBigEndian(version); + version = SwapIfBigEndianMacroBased(version); f.write(reinterpret_cast<char const *>(&version), kHeaderSize); return f.good(); } @@ -96,7 +96,7 @@ inline bool ReadVersion(fstream & f, uint32_t & version) { static_assert(kHeaderSize == sizeof(version), ""); f.read(reinterpret_cast<char *>(&version), kHeaderSize); - version = SwapIfBigEndian(version); + version = SwapIfBigEndianMacroBased(version); return f.good(); } |