Linkgraph: Replace a std::list with a std::vector.

This commit is contained in:
Jonathan G Rennison
2017-02-08 20:38:05 +00:00
parent c86a027e88
commit 117b56caeb
4 changed files with 30 additions and 25 deletions

View File

@@ -24,8 +24,9 @@ void FlowMapper::Run(LinkGraphJob &job) const
Node prev_node = job[node_id];
StationID prev = prev_node.Station();
PathList &paths = prev_node.Paths();
for (PathList::iterator i = paths.begin(); i != paths.end(); ++i) {
for (PathList::reverse_iterator i = paths.rbegin(); i != paths.rend(); ++i) {
Path *path = *i;
if (!path) continue;
uint flow = path->GetFlow();
if (flow == 0) break;
Node node = job[path->GetNode()];