From e8c8a0302fa0d7962722e1a0f88714bc458f4e9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BE=D0=B1=D1=80=D1=8B=D0=B8=CC=86=20=D0=AD=D1=8D?= =?UTF-8?q?=D1=85?= Date: Mon, 24 Jul 2017 18:08:32 +0300 Subject: [PATCH] [routing] Fix route rebuilding after pass checkpoint --- routing/index_router.cpp | 2 +- routing/route.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/routing/index_router.cpp b/routing/index_router.cpp index 01babda45c..304f8e9a15 100644 --- a/routing/index_router.cpp +++ b/routing/index_router.cpp @@ -253,7 +253,7 @@ IRouter::ResultCode IndexRouter::DoCalculateRoute(Checkpoints const & checkpoint segments.push_back(IndexGraphStarter::kStartFakeSegment); Segment startSegment; - if (!FindClosestSegment(checkpoints.GetStart(), true /* isOutgoing */, graph, startSegment)) + if (!FindClosestSegment(checkpoints.GetPointFrom(), true /* isOutgoing */, graph, startSegment)) return IRouter::StartPointNotFound; size_t subrouteSegmentsBegin = 0; diff --git a/routing/route.cpp b/routing/route.cpp index 9f05c43262..24a526f23c 100644 --- a/routing/route.cpp +++ b/routing/route.cpp @@ -55,6 +55,9 @@ void Route::Swap(Route & rhs) m_name.swap(rhs.m_name); m_absentCountries.swap(rhs.m_absentCountries); m_routeSegments.swap(rhs.m_routeSegments); + + swap(m_subrouteUid, rhs.m_subrouteUid); + swap(m_currentSubrouteIdx, rhs.m_currentSubrouteIdx); m_subrouteAttrs.swap(rhs.m_subrouteAttrs); }