(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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user