From b3b460cae294ccf31b013fbd8d198939afb6abef Mon Sep 17 00:00:00 2001 From: fonsinchen Date: Sat, 19 Oct 2013 17:15:19 +0000 Subject: (svn r25885) -Codechange: Keep paths sorted so that the ones with flow == 0 are in the back and don't have to be iterated over so often. --- src/linkgraph/linkgraphjob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/linkgraph/linkgraphjob.cpp') diff --git a/src/linkgraph/linkgraphjob.cpp b/src/linkgraph/linkgraphjob.cpp index dcdc7ba36..242689e8d 100644 --- a/src/linkgraph/linkgraphjob.cpp +++ b/src/linkgraph/linkgraphjob.cpp @@ -181,7 +181,7 @@ uint Path::AddFlow(uint new_flow, LinkGraphJob &job, uint max_saturation) } new_flow = this->parent->AddFlow(new_flow, job, max_saturation); if (this->flow == 0 && new_flow > 0) { - job[this->parent->node].Paths().push_back(this); + job[this->parent->node].Paths().push_front(this); } edge.AddFlow(new_flow); } -- cgit v1.2.3-54-g00ecf