diff --git a/integration_tests/routing_test_tools.cpp b/integration_tests/routing_test_tools.cpp index 5a262ea7fc..fd162231dd 100644 --- a/integration_tests/routing_test_tools.cpp +++ b/integration_tests/routing_test_tools.cpp @@ -139,7 +139,7 @@ namespace integration PedestrianRouterComponents(vector const & localFiles) : m_featuresFetcher(CreateFeaturesFetcher(localFiles)), m_searchEngine(CreateSearchEngine(m_featuresFetcher)), - m_router(CreatePedestrianRouter(m_featuresFetcher->GetIndex(), *m_searchEngine.get())) + m_router(CreatePedestrianRouter(m_featuresFetcher->GetIndex(), *m_searchEngine)) { } IRouter * GetRouter() const override { return m_router.get(); } diff --git a/routing/road_graph_router.cpp b/routing/road_graph_router.cpp index 485de31756..b1b1552346 100644 --- a/routing/road_graph_router.cpp +++ b/routing/road_graph_router.cpp @@ -88,7 +88,7 @@ RoadGraphRouter::RoadGraphRouter(string const & name, Index & index, unique_ptr && directionsEngine) : m_name(name) , m_countryFileFn(countryFileFn) - , m_index(&index) + , m_index(index) , m_algorithm(move(algorithm)) , m_roadGraph(make_unique(index, move(vehicleModelFactory))) , m_directionsEngine(move(directionsEngine)) @@ -103,7 +103,7 @@ void RoadGraphRouter::ClearState() bool RoadGraphRouter::CheckMapExistence(m2::PointD const & point, Route & route) const { string fileName = m_countryFileFn(point); - LocalCountryFile localCountryFile = m_index->GetMwmHandleByCountryFile(CountryFile(fileName)).GetInfo()->GetLocalFile(); + LocalCountryFile localCountryFile = m_index.GetMwmHandleByCountryFile(CountryFile(fileName)).GetInfo()->GetLocalFile(); if (!HasOptions(localCountryFile.GetFiles(), MapOptions::Map)) { route.AddAbsentCountry(fileName); diff --git a/routing/road_graph_router.hpp b/routing/road_graph_router.hpp index 12c1d722e2..0e8dda7159 100644 --- a/routing/road_graph_router.hpp +++ b/routing/road_graph_router.hpp @@ -47,7 +47,7 @@ private: string const m_name; TCountryFileFn const m_countryFileFn; - Index * m_index; + Index & m_index; unique_ptr const m_algorithm; unique_ptr const m_roadGraph; unique_ptr const m_directionsEngine;