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:
authorMikhail Gorbushin <m.gorbushin@corp.mail.ru>2019-08-23 19:39:51 +0300
committerVladimir Byko-Ianko <bykoianko@gmail.com>2019-08-27 12:32:51 +0300
commitdb2dc29c6a87aa2d3aef520b471b5dea1adecc93 (patch)
treeb4d975db23583e5ad795b504b5ee077a2da0925b /routing/index_router.cpp
parent96d3a20182ec71964aebe0290e8a7653bf663f14 (diff)
[routing] Refact EdgeEstimator add penalty for Ferries
Diffstat (limited to 'routing/index_router.cpp')
-rw-r--r--routing/index_router.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/routing/index_router.cpp b/routing/index_router.cpp
index 2835ea4892..5052d9a566 100644
--- a/routing/index_router.cpp
+++ b/routing/index_router.cpp
@@ -1313,12 +1313,14 @@ RouterResultCode IndexRouter::RedressRoute(vector<Segment> const & segments,
double time = 0.0;
times.emplace_back(static_cast<uint32_t>(0), 0.0);
- for (size_t i = 0; i + 1 < numPoints; ++i)
+ for (size_t i = 0; i < segments.size() - 1; ++i)
{
- time += starter.CalcSegmentETA(segments[i]);
+ time += starter.CalculateETA(segments[i], segments[i + 1]);
times.emplace_back(static_cast<uint32_t>(i + 1), time);
}
+ times.emplace_back(static_cast<uint32_t>(segments.size()), time);
+
CHECK(m_directionsEngine, ());
ReconstructRoute(*m_directionsEngine, roadGraph, m_trafficStash, delegate, junctions, move(times),
route);