summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
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/industry_cmd.cpp
parent1478fa93b344fc25000725dd143109e4def24f0b (diff)
downloadopenttd-d8605ad18da2a00fceb72b38325374b341ac6f16.tar.xz
Codechange: Replace FOR_VEHICLE_ORDERS with range-based for loops
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 92741e3f6..816146212 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -2609,8 +2609,7 @@ static int WhoCanServiceIndustry(Industry *ind)
* We cannot check the first of shared orders only, since the first vehicle in such a chain
* may have a different cargo type.
*/
- const Order *o;
- FOR_VEHICLE_ORDERS(v, o) {
+ for (const Order *o : v->Orders()) {
if (o->IsType(OT_GOTO_STATION) && !(o->GetUnloadType() & OUFB_TRANSFER)) {
/* Vehicle visits a station to load or unload */
Station *st = Station::Get(o->GetDestination());