diff --git a/map/framework.cpp b/map/framework.cpp index 11dcf1b126..ec47b32e3e 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -2326,14 +2326,16 @@ RouterType Framework::GetBestRouter(m2::PointD const & startPoint, m2::PointD co return RouterType::Pedestrian; else { - // Return on short calls the vehicle router flag only if we are already have routing files. + // Return on a short distance the vehicle router flag only if we are already have routing files. auto countryFileGetter = [this](m2::PointD const & p) { return GetSearchEngine()->GetCountryFile(p); }; if (!OsrmRouter::CheckRoutingAbility(startPoint, finalPoint, countryFileGetter, &m_model.GetIndex())) + { return RouterType::Pedestrian; + } } } return RouterType::Vehicle; diff --git a/routing/osrm_router.cpp b/routing/osrm_router.cpp index 7adffe9f68..1f4372508a 100644 --- a/routing/osrm_router.cpp +++ b/routing/osrm_router.cpp @@ -335,13 +335,12 @@ private: } // namespace // static -bool OsrmRouter::CheckRoutingAbility(m2::PointD const & startPoint, - m2::PointD const & finalPoint, - TCountryFileFn const & countryFileFn, Index * index) +bool OsrmRouter::CheckRoutingAbility(m2::PointD const & startPoint, m2::PointD const & finalPoint, + TCountryFileFn const & countryFileFn, Index * index) { - RoutingIndexManager manager(countryFileFn, index); - return manager.GetMappingByPoint(startPoint)->IsValid() && - manager.GetMappingByPoint(finalPoint)->IsValid(); + RoutingIndexManager manager(countryFileFn, index); + return manager.GetMappingByPoint(startPoint)->IsValid() && + manager.GetMappingByPoint(finalPoint)->IsValid(); } OsrmRouter::OsrmRouter(Index * index, TCountryFileFn const & countryFileFn)