summaryrefslogtreecommitdiff
path: root/src/autoreplace_gui.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-12-15 22:45:18 +0100
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-12-21 20:13:03 +0100
commit1f6b3a37f9c39adb22eb61d3153b0c62bfa20551 (patch)
tree15486a7d6bb1445f3d6f1cbf40f98c1552368c08 /src/autoreplace_gui.cpp
parent1c92ba8ebed55e5455d6f57508db8ce55071d6eb (diff)
downloadopenttd-1f6b3a37f9c39adb22eb61d3153b0c62bfa20551.tar.xz
Codechange: Replace FOR_ALL_ENGINES with range-based for loops
Diffstat (limited to 'src/autoreplace_gui.cpp')
-rw-r--r--src/autoreplace_gui.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp
index 3999597a0..19df0f1d8 100644
--- a/src/autoreplace_gui.cpp
+++ b/src/autoreplace_gui.cpp
@@ -124,8 +124,7 @@ class ReplaceVehicleWindow : public Window {
GUIEngineList *list = &this->engines[side];
list->clear();
- const Engine *e;
- FOR_ALL_ENGINES_OF_TYPE(e, type) {
+ for (const Engine *e : Engine::IterateType(type)) {
if (!draw_left && !this->show_hidden_engines && e->IsHidden(_local_company)) continue;
EngineID eid = e->index;
switch (type) {