From f69076f55cbb0cfe7ff5f36ec995fb71f180b4af Mon Sep 17 00:00:00 2001 From: DennisOSRM Date: Wed, 22 Aug 2012 16:20:13 +0200 Subject: [PATCH] Using back reference instead of iterator arithmetic --- DataStructures/ExtractorCallBacks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DataStructures/ExtractorCallBacks.h b/DataStructures/ExtractorCallBacks.h index 885b938fd..778e8a2c4 100644 --- a/DataStructures/ExtractorCallBacks.h +++ b/DataStructures/ExtractorCallBacks.h @@ -308,7 +308,7 @@ public: externalMemory->allEdges.push_back(_Edge(w.path[n], w.path[n+1], w.type, w.direction, w.speed, w.nameID, w.roundabout, highway == settings.excludeFromGrid || "pier" == highway, w.isDurationSet, w.isAccessRestricted)); externalMemory->usedNodeIDs.push_back(w.path[n]); } - externalMemory->usedNodeIDs.push_back(w.path[w.path.size()-1]); + externalMemory->usedNodeIDs.push_back(w.path.back()); //The following information is needed to identify start and end segments of restrictions externalMemory->wayStartEndVector.push_back(_WayIDStartAndEndEdge(w.id, w.path[0], w.path[1], w.path[w.path.size()-2], w.path[w.path.size()-1]));