diff options
author | Lev Dragunov <l.dragunov@corp.mail.ru> | 2015-08-25 12:22:25 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:02:20 +0300 |
commit | 15d9bc30df0f44b740c86876354902b21fe5f30d (patch) | |
tree | 0983755e9e54b9c9f1a240a5ecb4a59345cad6d8 /routing | |
parent | 0d858a4023a08af3df4175c7f38e74bef01eebe7 (diff) |
Distance to turn calculation fix.
Diffstat (limited to 'routing')
-rw-r--r-- | routing/route.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routing/route.cpp b/routing/route.cpp index b518a45312..783d4aaa9c 100644 --- a/routing/route.cpp +++ b/routing/route.cpp @@ -153,9 +153,9 @@ void Route::GetCurrentTurn(double & distanceToTurnMeters, turns::TurnItem & turn return lhs.m_index < rhs.m_index; }); - ASSERT_GREATER_OR_EQUAL((*it).m_index - 1, 0, ()); + ASSERT_GREATER_OR_EQUAL((*it).m_index, 0, ()); - size_t const segIdx = (*it).m_index - 1; + size_t const segIdx = (*it).m_index; turn = (*it); distanceToTurnMeters = m_poly.GetDistanceM(m_poly.GetCurrentIter(), m_poly.GetIterToIndex(segIdx)); |