From 26c1dbaa349843366f9f7ca7ffc3aa0be1572efa Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Fri, 9 Jun 2017 17:22:07 +0300 Subject: [PATCH] Build fix. --- map/routing_manager.cpp | 11 +++++------ map/routing_manager.hpp | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/map/routing_manager.cpp b/map/routing_manager.cpp index 7eec516e28..def20a7e14 100644 --- a/map/routing_manager.cpp +++ b/map/routing_manager.cpp @@ -156,14 +156,17 @@ void RoutingManager::SetRouterImpl(routing::RouterType type) return m_callbacks.m_countryInfoGetter().GetRegionCountryId(p); }; + auto numMwmIds = make_shared(); + m_delegate.RegisterCountryFilesOnRoute(numMwmIds); + if (type == RouterType::Pedestrian) { - router = CreatePedestrianAStarBidirectionalRouter(indexGetterFn(), countryFileGetter); + router = CreatePedestrianAStarBidirectionalRouter(indexGetterFn(), countryFileGetter, numMwmIds); m_routingSession.SetRoutingSettings(routing::GetPedestrianRoutingSettings()); } else if (type == RouterType::Bicycle) { - router = CreateBicycleAStarBidirectionalRouter(indexGetterFn(), countryFileGetter); + router = CreateBicycleAStarBidirectionalRouter(indexGetterFn(), countryFileGetter, numMwmIds); m_routingSession.SetRoutingSettings(routing::GetBicycleRoutingSettings()); } else @@ -179,10 +182,6 @@ void RoutingManager::SetRouterImpl(routing::RouterType type) return version::MwmTraits(mwmId.GetInfo()->m_version).HasRoutingIndex(); }; - auto numMwmIds = make_shared(); - - m_delegate.RegisterCountryFilesOnRoute(numMwmIds); - auto const getMwmRectByName = [this](std::string const & countryId) -> m2::RectD { return m_callbacks.m_countryInfoGetter().GetLimitRectForLeaf(countryId); }; diff --git a/map/routing_manager.hpp b/map/routing_manager.hpp index 1a0418d733..fbb5593c12 100644 --- a/map/routing_manager.hpp +++ b/map/routing_manager.hpp @@ -28,7 +28,6 @@ class DrapeEngine; namespace storage { class CountryInfoGetter; -class Storage; } namespace routing