From 508077e21a4ac98e8ed1a36ad8b32935cafde9ff Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Mon, 5 Aug 2019 17:14:54 +0300 Subject: [PATCH] [routing] Review fixes. --- routing/features_road_graph.hpp | 4 ++-- routing/index_graph.cpp | 2 ++ routing/index_router.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/routing/features_road_graph.hpp b/routing/features_road_graph.hpp index a751386dc9..4405822a76 100644 --- a/routing/features_road_graph.hpp +++ b/routing/features_road_graph.hpp @@ -82,8 +82,8 @@ public: ICrossEdgesLoader & edgesLoader) const override; void FindClosestEdges(m2::RectD const & rect, uint32_t count, std::vector> & vicinities) const override; - std::vector FindRoads( - m2::RectD const & rect, IsGoodFeatureFn const & isGoodFeature) const override; + std::vector + FindRoads(m2::RectD const & rect, IsGoodFeatureFn const & isGoodFeature) const override; void GetFeatureTypes(FeatureID const & featureId, feature::TypesHolder & types) const override; void GetJunctionTypes(Junction const & junction, feature::TypesHolder & types) const override; IRoadGraph::Mode GetMode() const override; diff --git a/routing/index_graph.cpp b/routing/index_graph.cpp index eaa1903b9c..7e3173a454 100644 --- a/routing/index_graph.cpp +++ b/routing/index_graph.cpp @@ -249,6 +249,8 @@ void IndexGraph::GetSegmentCandidateForJoint(Segment const & parent, bool isOutg if (!road.IsValid()) return; + // Note. Flag |useRoutingOptions| is not passed to this place because it's true + // for all cases in current code. So if below should be checked anyway. if (!road.SuitableForOptions(m_avoidRoutingOptions)) return; diff --git a/routing/index_router.cpp b/routing/index_router.cpp index b4036f557d..441820cf1a 100644 --- a/routing/index_router.cpp +++ b/routing/index_router.cpp @@ -1007,7 +1007,7 @@ bool IndexRouter::FindBestEdges(m2::PointD const & point, // candidates if it's a dead end taking into acount routing options. We ignore candidates as well // if they don't match RoutingOptions. set deadEnds; - auto const isGood = [&, this](pair const & edgeProj){ + auto const isGood = [&](pair const & edgeProj){ auto const segment = GetSegmentByEdge(edgeProj.first); if (IsDeadEndCached(segment, isOutgoing, true /* useRoutingOptions */, worldGraph, deadEnds)) return false;