Only iterate from path_b to path_new when intersecting

master
Markus Koch 2021-06-20 14:44:09 +02:00
parent 6ffee116c7
commit 7753ce8477
1 changed files with 1 additions and 2 deletions

View File

@ -374,8 +374,7 @@ int dijkstra_path_intersect(struct dijkstra_solver *solver,
path_new->destination,
path_new->net_meta->type);
// TODO: I don't have to iterate over the *entire* array here, it should be enough to only iterate over the entries after path_b.
dijkstra_path_intersect_all(solver, path_new, path_new); // Since straight paths can only cross once, we don't need to check any newly created entries.
dijkstra_path_intersect_all(solver, path_b, path_new); // Since straight paths can only cross once, we don't need to check any newly created entries.
}
// Now do the same thing for path b