(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.

This commit is contained in:
fonsinchen
2013-10-19 17:15:19 +00:00
parent c08259fe92
commit b3b460cae2
4 changed files with 28 additions and 7 deletions

View File

@@ -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);
}