diff --git a/routing/index_router.cpp b/routing/index_router.cpp index 4eee3c1aa8..c09a2e02d1 100644 --- a/routing/index_router.cpp +++ b/routing/index_router.cpp @@ -432,9 +432,8 @@ IRouter::ResultCode IndexRouter::DoCalculateRoute(Checkpoints const & checkpoint starter ? starter->GetNumFakeSegments() : 0, isStartSegmentStrictForward, graph); vector subroute; - Junction startJunction; - auto const result = CalculateSubroute(checkpoints, i, startSegment, delegate, subrouteStarter, - subroute, startJunction); + auto const result = + CalculateSubroute(checkpoints, i, startSegment, delegate, subrouteStarter, subroute); if (result != IRouter::NoError) return result; @@ -478,8 +477,7 @@ IRouter::ResultCode IndexRouter::CalculateSubroute(Checkpoints const & checkpoin size_t subrouteIdx, Segment const & startSegment, RouterDelegate const & delegate, IndexGraphStarter & starter, - vector & subroute, - Junction & startJunction) + vector & subroute) { subroute.clear(); @@ -498,11 +496,6 @@ IRouter::ResultCode IndexRouter::CalculateSubroute(Checkpoints const & checkpoin LOG(LINFO, ("Routing in mode:", starter.GetGraph().GetMode())); - if (subrouteIdx == checkpoints.GetPassedIdx()) - startJunction = starter.GetStartJunction(); - else - startJunction = starter.GetJunction(startSegment, false /* front */); - auto const progressRange = CalcProgressRange(checkpoints, subrouteIdx); AStarProgress progress(progressRange.startValue, progressRange.stopValue); progress.Initialize(starter.GetStartJunction().GetPoint(), diff --git a/routing/index_router.hpp b/routing/index_router.hpp index cc01b38802..9515e4711e 100644 --- a/routing/index_router.hpp +++ b/routing/index_router.hpp @@ -76,7 +76,7 @@ private: IRouter::ResultCode CalculateSubroute(Checkpoints const & checkpoints, size_t subrouteIdx, Segment const & startSegment, RouterDelegate const & delegate, IndexGraphStarter & graph, - std::vector & subroute, Junction & startJunction); + std::vector & subroute); IRouter::ResultCode AdjustRoute(Checkpoints const & checkpoints, m2::PointD const & startDirection,