mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
Linkgraph: Do not pre-fill annos set at start of MCF Dijkstra
This commit is contained in:
parent
4a420ef864
commit
cd68e9fac7
@ -384,7 +384,7 @@ void MultiCommodityFlow::Dijkstra(NodeID source_node, PathVector &paths)
|
||||
for (NodeID node = 0; node < size; ++node) {
|
||||
AnnosWrapper<Tannotation> *anno = new (this->job.path_allocator.Allocate()) AnnosWrapper<Tannotation>(node, node == source_node);
|
||||
anno->UpdateAnnotation();
|
||||
anno->self_iter = annos.insert(AnnoSetItem<Tannotation>(anno)).first;
|
||||
anno->self_iter = (node == source_node) ? annos.insert(AnnoSetItem<Tannotation>(anno)).first : annos.end(); // only insert the source node, the other nodes will be added as reached
|
||||
paths[node] = anno;
|
||||
}
|
||||
while (!annos.empty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user