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:
authorDenis Koronchik <denis@mapswithme.com>2014-10-02 17:10:22 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:29:15 +0300
commit7ab2f762c4372d22576e7d645be84310b1515b3a (patch)
tree092f74262bf6b9911356938951e14ba8a488eead /routing/osrm2feature_map.cpp
parent35a76a8ea44963265c0757ccb7d86b66f20e51d8 (diff)
[routing] Add final point candidates cache in routing algorithm
Diffstat (limited to 'routing/osrm2feature_map.cpp')
-rw-r--r--routing/osrm2feature_map.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/routing/osrm2feature_map.cpp b/routing/osrm2feature_map.cpp
index 26e1df1e4b..81ac787454 100644
--- a/routing/osrm2feature_map.cpp
+++ b/routing/osrm2feature_map.cpp
@@ -148,8 +148,9 @@ void OsrmFtSegMapping::DumpSegmentByNode(OsrmNodeIdT nodeId) const
void OsrmFtSegMapping::GetOsrmNodes(FtSegSetT & segments, OsrmNodesT & res) const
{
- auto addResFn = [&res](uint64_t seg, OsrmNodeIdT nodeId, bool forward)
+ auto addResFn = [&](uint64_t seg, size_t idx, bool forward)
{
+ OsrmNodeIdT const nodeId = GetNodeId(idx);
auto it = res.insert({ seg, { forward ? nodeId : INVALID_NODE_ID,
forward ? INVALID_NODE_ID : nodeId } });
if (it.second)
@@ -185,7 +186,7 @@ void OsrmFtSegMapping::GetOsrmNodes(FtSegSetT & segments, OsrmNodesT & res) cons
{
if (seg.m_pointStart >= s.m_pointStart && seg.m_pointEnd <= s.m_pointEnd)
{
- if (addResFn(seg.Store(), GetNodeId(i), true))
+ if (addResFn(seg.Store(), i, true))
{
segments.erase(it);
break;
@@ -196,7 +197,7 @@ void OsrmFtSegMapping::GetOsrmNodes(FtSegSetT & segments, OsrmNodesT & res) cons
{
if (seg.m_pointStart >= s.m_pointEnd && seg.m_pointEnd <= s.m_pointStart)
{
- if (addResFn(seg.Store(), GetNodeId(i), false))
+ if (addResFn(seg.Store(), i, false))
{
segments.erase(it);
break;