summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 126e6fd9d..4b2acb2db 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -3664,9 +3664,8 @@ void DeleteStaleLinks(Station *from)
if (auto_distributed) {
/* Have all vehicles refresh their next hops before deciding to
* remove the node. */
- OrderList *l;
std::vector<Vehicle *> vehicles;
- FOR_ALL_ORDER_LISTS(l) {
+ for (OrderList *l : OrderList::Iterate()) {
bool found_from = false;
bool found_to = false;
for (Order *order = l->GetFirstOrder(); order != nullptr; order = order->next) {