[traffic] Comment out more obsolete code

Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
mvglasow
2025-06-07 15:19:49 +03:00
parent 588332a23b
commit ae5dea4a53
2 changed files with 18 additions and 3 deletions

View File

@@ -156,8 +156,10 @@ void TrafficManager::Clear()
// TODO figure out which of the ones below we still need // TODO figure out which of the ones below we still need
m_lastDrapeMwmsByRect.clear(); m_lastDrapeMwmsByRect.clear();
m_lastRoutingMwmsByRect.clear(); m_lastRoutingMwmsByRect.clear();
#ifdef traffic_dead_code
m_requestedMwms.clear(); m_requestedMwms.clear();
m_trafficETags.clear(); m_trafficETags.clear();
#endif
LOG(LINFO, ("Messages in cache:", m_messageCache.size())); LOG(LINFO, ("Messages in cache:", m_messageCache.size()));
LOG(LINFO, ("Feeds in queue:", m_feedQueue.size())); LOG(LINFO, ("Feeds in queue:", m_feedQueue.size()));
@@ -182,6 +184,8 @@ void TrafficManager::OnMwmDeregistered(platform::LocalCountryFile const & countr
if (!IsEnabled()) if (!IsEnabled())
return; return;
// TODO no longer needed
#ifdef traffic_dead_code
{ {
std::lock_guard<std::mutex> lock(m_mutex); std::lock_guard<std::mutex> lock(m_mutex);
@@ -197,6 +201,7 @@ void TrafficManager::OnMwmDeregistered(platform::LocalCountryFile const & countr
ClearCache(mwmId); ClearCache(mwmId);
} }
#endif
} }
void TrafficManager::OnDestroySurface() void TrafficManager::OnDestroySurface()
@@ -663,7 +668,10 @@ void TrafficManager::RequestTrafficData(MwmSet::MwmId const & mwmId, bool force)
if (needRequesting) if (needRequesting)
{ {
// TODO no longer needed
#ifdef traffic_dead_code
m_requestedMwms.push_back(mwmId); m_requestedMwms.push_back(mwmId);
#endif
m_condition.notify_one(); m_condition.notify_one();
} }
} }
@@ -883,7 +891,6 @@ void TrafficManager::ShrinkCacheToAllowableSize()
} }
} }
} }
#endif
void TrafficManager::ClearCache(MwmSet::MwmId const & mwmId) void TrafficManager::ClearCache(MwmSet::MwmId const & mwmId)
{ {
@@ -913,6 +920,7 @@ void TrafficManager::ClearCache(MwmSet::MwmId const & mwmId)
m_lastDrapeMwmsByRect.clear(); m_lastDrapeMwmsByRect.clear();
m_lastRoutingMwmsByRect.clear(); m_lastRoutingMwmsByRect.clear();
} }
#endif
bool TrafficManager::IsEnabled() const bool TrafficManager::IsEnabled() const
{ {

View File

@@ -464,6 +464,8 @@ private:
*/ */
void RequestTrafficData(MwmSet::MwmId const & mwmId, bool force); 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. * @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. * @param mwmId The mwmId for which to remove traffic data.
*/ */
void ClearCache(MwmSet::MwmId const & mwmId); void ClearCache(MwmSet::MwmId const & mwmId);
// TODO no longer needed
#ifdef traffic_dead_code
void ShrinkCacheToAllowableSize(); void ShrinkCacheToAllowableSize();
#endif #endif
@@ -582,17 +582,24 @@ private:
std::vector<MwmSet::MwmId> m_lastRoutingMwmsByRect; std::vector<MwmSet::MwmId> m_lastRoutingMwmsByRect;
std::set<MwmSet::MwmId> m_activeRoutingMwms; std::set<MwmSet::MwmId> 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. // 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, // It is one of several mechanisms that HTTP provides for web cache validation,
// which allows a client to make conditional requests. // which allows a client to make conditional requests.
std::map<MwmSet::MwmId, std::string> m_trafficETags; std::map<MwmSet::MwmId, std::string> m_trafficETags;
#endif
std::atomic<bool> m_isPaused; std::atomic<bool> m_isPaused;
// TODO no longer needed
#ifdef traffic_dead_code
/** /**
* @brief MWMs for which to retrieve traffic data. * @brief MWMs for which to retrieve traffic data.
*/ */
std::vector<MwmSet::MwmId> m_requestedMwms; std::vector<MwmSet::MwmId> m_requestedMwms;
#endif
std::mutex m_mutex; std::mutex m_mutex;
/** /**