Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorДобрый Ээх <bukharaev@gmail.com>2017-07-24 18:08:32 +0300
committerVladimir Byko-Ianko <bykoianko@gmail.com>2017-07-25 11:13:28 +0300
commitcb884f88b2a7c4228a18689a070a95424e664365 (patch)
treeb396626fb693adef409ecfcfd598320045d62a77
parent9059218fef413c0f944ba6a25034b0d1d28eb861 (diff)
[routing] Fix route rebuilding after pass checkpoint
-rw-r--r--routing/index_router.cpp2
-rw-r--r--routing/route.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/routing/index_router.cpp b/routing/index_router.cpp
index eaeb05bce1..5aed3acab0 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 3b3164a431..bcbf5e4ef8 100644
--- a/routing/route.cpp
+++ b/routing/route.cpp
@@ -55,6 +55,9 @@ void Route::Swap(Route & rhs)
m_altitudes.swap(rhs.m_altitudes);
m_traffic.swap(rhs.m_traffic);
m_routeSegments.swap(rhs.m_routeSegments);
+
+ swap(m_subrouteUid, rhs.m_subrouteUid);
+ swap(m_currentSubrouteIdx, rhs.m_currentSubrouteIdx);
m_subrouteAttrs.swap(rhs.m_subrouteAttrs);
}