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:
authorLev Dragunov <l.dragunov@corp.mail.ru>2015-08-24 17:09:37 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:02:14 +0300
commitae1ff84627246e5af6fceb9ab2f34f0741b853bd (patch)
tree90461e3253f58dfdf27fabdad97f5d0eb5c9faea /routing
parentf15e332deca77fd9b1fe5294ac842f18b4c62478 (diff)
[routing] Routing following crash fix.
Diffstat (limited to 'routing')
-rw-r--r--routing/route.cpp4
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));
}