[traffic] Initialize TrafficManager with CountryParentNameGetterFn

Signed-off-by: mvglasow <michael -at- vonglasow.com>

# Conflicts:
#	map/framework.cpp
#	map/traffic_manager.cpp
#	map/traffic_manager.hpp
This commit is contained in:
mvglasow
2025-04-29 23:57:13 +03:00
parent 9c93f421ac
commit 737d7b5643
3 changed files with 13 additions and 4 deletions

View File

@@ -295,7 +295,8 @@ Framework::Framework(FrameworkParams const & params, bool loadMaps)
[this]() -> StringsBundle const & { return m_stringsBundle; },
[this]() -> power_management::PowerManager const & { return m_powerManager; }),
static_cast<RoutingManager::Delegate &>(*this))
, m_trafficManager(bind(&Framework::GetMwmsByRect, this, _1, false /* rough */),
, m_trafficManager([this](string const & id) -> string { return m_storage.GetParentIdFor(id); },
bind(&Framework::GetMwmsByRect, this, _1, false /* rough */),
kMaxTrafficCacheSizeBytes, m_routingManager.RoutingSession())
, m_lastReportedCountry(kInvalidCountryId)
, m_popularityLoader(m_featuresFetcher.GetDataSource(), POPULARITY_RANKS_FILE_TAG)