diff options
author | glx <glx@openttd.org> | 2019-12-15 22:45:18 +0100 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-12-21 20:13:03 +0100 |
commit | 1f6b3a37f9c39adb22eb61d3153b0c62bfa20551 (patch) | |
tree | 15486a7d6bb1445f3d6f1cbf40f98c1552368c08 /src/depot_gui.cpp | |
parent | 1c92ba8ebed55e5455d6f57508db8ce55071d6eb (diff) | |
download | openttd-1f6b3a37f9c39adb22eb61d3153b0c62bfa20551.tar.xz |
Codechange: Replace FOR_ALL_ENGINES with range-based for loops
Diffstat (limited to 'src/depot_gui.cpp')
-rw-r--r-- | src/depot_gui.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index 430d02381..f525e714c 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -170,8 +170,7 @@ static void InitBlocksizeForVehicles(VehicleType type, EngineImageType image_typ int max_extend_right = 0; uint max_height = 0; - const Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, type) { + for (const Engine *e : Engine::IterateType(type)) { if (!e->IsEnabled()) continue; EngineID eid = e->index; @@ -222,8 +221,7 @@ void InitDepotWindowBlockSizes() _consistent_train_width = TRAININFO_DEFAULT_VEHICLE_WIDTH; bool first = true; - const Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) { + for (const Engine *e : Engine::IterateType(VEH_TRAIN)) { if (!e->IsEnabled()) continue; uint w = TRAININFO_DEFAULT_VEHICLE_WIDTH; |