Codechange: Build station and depot vehicle lists from shared order lists. (#11676)

The brings some performance advantages:

* No need to iterate all vehicles and check for primary vehicle as only vehicles that can have orders are listed.
* Shared orders only need to be tested once instead of for each vehicle sharing them.
* Vehicle tests only need to be performed on the first shared vehicle instead of all.
This commit is contained in:
Peter Nelson
2024-01-05 18:59:38 +00:00
committed by GitHub
parent 7788b68bbe
commit 34e8c8e1c1
4 changed files with 71 additions and 41 deletions

View File

@@ -510,6 +510,7 @@ add_files(
vehiclelist.cpp
vehiclelist.h
vehiclelist_cmd.h
vehiclelist_func.h
viewport.cpp
viewport_cmd.h
viewport_func.h