diff options
author | Maxim Pimenov <m@maps.me> | 2018-09-14 21:08:09 +0300 |
---|---|---|
committer | Vlad Mihaylenko <vxmihaylenko@gmail.com> | 2018-09-18 14:46:56 +0300 |
commit | 412387c84eefba2ec4c267ee2748bf78f03ce327 (patch) | |
tree | 8d79b6b480fb91a5458a21aec10ac689de54db9f /local_ads | |
parent | bef147b46fb8fd5160fc8e3b13f3548906ae5ef7 (diff) |
[base] Replaced the namespace my with base.
Diffstat (limited to 'local_ads')
-rw-r--r-- | local_ads/event.cpp | 4 | ||||
-rw-r--r-- | local_ads/local_ads_tests/statistics_tests.cpp | 2 | ||||
-rw-r--r-- | local_ads/statistics.cpp | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/local_ads/event.cpp b/local_ads/event.cpp index 42683672d7..0367d5d71d 100644 --- a/local_ads/event.cpp +++ b/local_ads/event.cpp @@ -39,8 +39,8 @@ bool Event::operator==(Event const & event) const return m_type == event.m_type && m_mwmVersion == event.m_mwmVersion && m_countryId == event.m_countryId && m_featureId == event.m_featureId && m_zoomLevel == event.m_zoomLevel && - my::AlmostEqualAbs(m_latitude, event.m_latitude, kEps) && - my::AlmostEqualAbs(m_longitude, event.m_longitude, kEps) && + base::AlmostEqualAbs(m_latitude, event.m_latitude, kEps) && + base::AlmostEqualAbs(m_longitude, event.m_longitude, kEps) && m_accuracyInMeters == event.m_accuracyInMeters && duration_cast<seconds>(m_timestamp - event.m_timestamp).count() == 0; } diff --git a/local_ads/local_ads_tests/statistics_tests.cpp b/local_ads/local_ads_tests/statistics_tests.cpp index efe791a04a..a8a92c5147 100644 --- a/local_ads/local_ads_tests/statistics_tests.cpp +++ b/local_ads/local_ads_tests/statistics_tests.cpp @@ -63,7 +63,7 @@ UNIT_TEST(LocalAdsStatistics_Write_With_Unprocessed) std::list<local_ads::Event> expectedUnprocessedEvents = events2; expectedUnprocessedEvents.sort(); - my::GetNameFromFullPath(fileNameToRebuild); + base::GetNameFromFullPath(fileNameToRebuild); TEST_EQUAL(fileNameToRebuild, "Moscow_123456.dat", ()); TEST_EQUAL(expectedUnprocessedEvents, unprocessedEvents2, ()); } diff --git a/local_ads/statistics.cpp b/local_ads/statistics.cpp index c027ade5fa..d9face059d 100644 --- a/local_ads/statistics.cpp +++ b/local_ads/statistics.cpp @@ -130,7 +130,7 @@ local_ads::Timestamp GetMaxTimestamp(std::list<local_ads::Event> const & events, std::string GetPath(std::string const & fileName) { - return my::JoinFoldersToPath({GetPlatform().WritableDir(), kStatisticsFolderName}, fileName); + return base::JoinFoldersToPath({GetPlatform().WritableDir(), kStatisticsFolderName}, fileName); } std::string GetPath(local_ads::Event const & event) @@ -196,16 +196,16 @@ std::vector<uint8_t> SerializeForServer(std::list<local_ads::Event> const & even { using namespace std::chrono; ASSERT(!events.empty(), ()); - auto root = my::NewJSONObject(); + auto root = base::NewJSONObject(); ToJSONObject(*root, "userId", userId); static std::string offlineId = GetPlatform().MacAddress(true /* md5Decoded */); ToJSONObject(*root, "offlineId", offlineId); ToJSONObject(*root, "countryId", events.front().m_countryId); ToJSONObject(*root, "mwmVersion", events.front().m_mwmVersion); - auto eventsNode = my::NewJSONArray(); + auto eventsNode = base::NewJSONArray(); for (auto const & event : events) { - auto eventNode = my::NewJSONObject(); + auto eventNode = base::NewJSONObject(); auto s = duration_cast<seconds>(event.m_timestamp.time_since_epoch()).count(); ToJSONObject(*eventNode, "type", static_cast<uint8_t>(event.m_type)); ToJSONObject(*eventNode, "timestamp", static_cast<int64_t>(s)); |