diff options
author | Lev Dragunov <l.dragunov@corp.mail.ru> | 2015-08-24 17:09:37 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:02:14 +0300 |
commit | ae1ff84627246e5af6fceb9ab2f34f0741b853bd (patch) | |
tree | 90461e3253f58dfdf27fabdad97f5d0eb5c9faea /routing | |
parent | f15e332deca77fd9b1fe5294ac842f18b4c62478 (diff) |
[routing] Routing following crash 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 42f40f4061..b518a45312 100644 --- a/routing/route.cpp +++ b/routing/route.cpp @@ -123,11 +123,11 @@ uint32_t Route::GetCurrentTimeToEndSec() const }; ASSERT_LESS_OR_EQUAL(m_times[idx].first, poly.GetSize(), ()); - double const dist = distFn(idx > 0 ? m_times[idx - 1].first : 0, m_times[idx].first + 1); + double const dist = distFn(idx > 0 ? m_times[idx - 1].first : 0, m_times[idx].first); if (!my::AlmostEqualULPs(dist, 0.)) { - double const distRemain = distFn(m_poly.GetCurrentIter().m_ind, m_times[idx].first + 1) - + double const distRemain = distFn(m_poly.GetCurrentIter().m_ind, m_times[idx].first) - MercatorBounds::DistanceOnEarth(m_poly.GetCurrentIter().m_pt, poly.GetPoint(m_poly.GetCurrentIter().m_ind)); return (uint32_t)((GetTotalTimeSec() - (*it).second) + (double)time * (distRemain / dist)); } |