summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2020-12-27 00:13:56 +0100
committerCharles Pigott <charlespigott@googlemail.com>2020-12-27 10:28:46 +0000
commitd8605ad18da2a00fceb72b38325374b341ac6f16 (patch)
tree8a6d33a6e57c2bc6a51cfe18443510c3b6a7bdbe /src/saveload
parent1478fa93b344fc25000725dd143109e4def24f0b (diff)
downloadopenttd-d8605ad18da2a00fceb72b38325374b341ac6f16.tar.xz
Codechange: Replace FOR_VEHICLE_ORDERS with range-based for loops
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index c617348d7..4eab99c88 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -1733,8 +1733,7 @@ bool AfterLoadGame()
v->current_order.ConvertFromOldSavegame();
if (v->type == VEH_ROAD && v->IsPrimaryVehicle() && v->FirstShared() == v) {
- Order* order;
- FOR_VEHICLE_ORDERS(v, order) order->SetNonStopType(ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS);
+ for (Order *order : v->Orders()) order->SetNonStopType(ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS);
}
}
} else if (IsSavegameVersionBefore(SLV_94)) {