diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-12-01 13:41:57 +0300 |
---|---|---|
committer | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-12-03 11:54:57 +0300 |
commit | c5c9eb5c06984fafaac9dc58828b6427ad0500d3 (patch) | |
tree | 187d024b5a29644caf22ed1a74198a026e9eae5e /map/traffic_manager.cpp | |
parent | 47ded79083994e11c2a606f8bd188ef72ec9d35b (diff) |
Review fixes.
Diffstat (limited to 'map/traffic_manager.cpp')
-rw-r--r-- | map/traffic_manager.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/map/traffic_manager.cpp b/map/traffic_manager.cpp index d24bcdb9e7..a7cea9da6a 100644 --- a/map/traffic_manager.cpp +++ b/map/traffic_manager.cpp @@ -38,10 +38,10 @@ TrafficManager::CacheEntry::CacheEntry(time_point<steady_clock> const & requestT {} TrafficManager::TrafficManager(GetMwmsByRectFn const & getMwmsByRectFn, - RoutingFns const & routingFns, - size_t maxCacheSizeBytes) + size_t maxCacheSizeBytes, + traffic::RoutingObserver & routingObserver) : m_getMwmsByRectFn(getMwmsByRectFn) - , m_routingFns(routingFns) + , m_routingObserver(routingObserver) , m_currentDataVersion(0) , m_state(TrafficState::Disabled) , m_maxCacheSizeBytes(maxCacheSizeBytes) @@ -96,7 +96,7 @@ void TrafficManager::SetEnabled(bool enabled) UpdateMyPosition(m_currentPosition.first); } - m_routingFns.m_enableTrafficFn(enabled); + m_routingObserver.OnTrafficEnabled(enabled); } void TrafficManager::Clear() @@ -333,7 +333,7 @@ void TrafficManager::OnTrafficDataResponse(traffic::TrafficInfo const & info) UpdateState(); // Update traffic colors for routing. - m_routingFns.m_addTrafficInfoFn(info); + m_routingObserver.OnTrafficInfoAdded(info); } void TrafficManager::CheckCacheSize() @@ -354,7 +354,7 @@ void TrafficManager::CheckCacheSize() { m_currentCacheSizeBytes -= it->second.m_dataSize; m_drapeEngine->ClearTrafficCache(mwmId); - m_routingFns.m_removeTrafficInfoFn(mwmId); + m_routingObserver.OnTrafficInfoRemoved(mwmId); } m_mwmCache.erase(it); ++itSeen; |