diff --git a/map/traffic_manager.cpp b/map/traffic_manager.cpp index 696fab397..f8642b278 100644 --- a/map/traffic_manager.cpp +++ b/map/traffic_manager.cpp @@ -156,8 +156,10 @@ void TrafficManager::Clear() // TODO figure out which of the ones below we still need m_lastDrapeMwmsByRect.clear(); m_lastRoutingMwmsByRect.clear(); +#ifdef traffic_dead_code m_requestedMwms.clear(); m_trafficETags.clear(); +#endif LOG(LINFO, ("Messages in cache:", m_messageCache.size())); LOG(LINFO, ("Feeds in queue:", m_feedQueue.size())); @@ -182,6 +184,8 @@ void TrafficManager::OnMwmDeregistered(platform::LocalCountryFile const & countr if (!IsEnabled()) return; +// TODO no longer needed +#ifdef traffic_dead_code { std::lock_guard lock(m_mutex); @@ -197,6 +201,7 @@ void TrafficManager::OnMwmDeregistered(platform::LocalCountryFile const & countr ClearCache(mwmId); } +#endif } void TrafficManager::OnDestroySurface() @@ -663,7 +668,10 @@ void TrafficManager::RequestTrafficData(MwmSet::MwmId const & mwmId, bool force) if (needRequesting) { +// TODO no longer needed +#ifdef traffic_dead_code m_requestedMwms.push_back(mwmId); +#endif m_condition.notify_one(); } } @@ -883,7 +891,6 @@ void TrafficManager::ShrinkCacheToAllowableSize() } } } -#endif void TrafficManager::ClearCache(MwmSet::MwmId const & mwmId) { @@ -913,6 +920,7 @@ void TrafficManager::ClearCache(MwmSet::MwmId const & mwmId) m_lastDrapeMwmsByRect.clear(); m_lastRoutingMwmsByRect.clear(); } +#endif bool TrafficManager::IsEnabled() const { diff --git a/map/traffic_manager.hpp b/map/traffic_manager.hpp index 487c70829..eb862cfc1 100644 --- a/map/traffic_manager.hpp +++ b/map/traffic_manager.hpp @@ -464,6 +464,8 @@ private: */ void RequestTrafficData(MwmSet::MwmId const & mwmId, bool force); + // TODO no longer needed +#ifdef traffic_dead_code /** * @brief Removes traffic data for one specific MWM from the cache. * @@ -476,8 +478,6 @@ private: * @param mwmId The mwmId for which to remove traffic data. */ void ClearCache(MwmSet::MwmId const & mwmId); -// TODO no longer needed -#ifdef traffic_dead_code void ShrinkCacheToAllowableSize(); #endif @@ -582,17 +582,24 @@ private: std::vector m_lastRoutingMwmsByRect; std::set m_activeRoutingMwms; +// TODO no longer needed +#ifdef traffic_dead_code // The ETag or entity tag is part of HTTP, the protocol for the World Wide Web. // It is one of several mechanisms that HTTP provides for web cache validation, // which allows a client to make conditional requests. std::map m_trafficETags; +#endif std::atomic m_isPaused; +// TODO no longer needed +#ifdef traffic_dead_code /** * @brief MWMs for which to retrieve traffic data. */ std::vector m_requestedMwms; +#endif + std::mutex m_mutex; /**