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/newgrf_engine.cpp | |
parent | 1c92ba8ebed55e5455d6f57508db8ce55071d6eb (diff) | |
download | openttd-1f6b3a37f9c39adb22eb61d3153b0c62bfa20551.tar.xz |
Codechange: Replace FOR_ALL_ENGINES with range-based for loops
Diffstat (limited to 'src/newgrf_engine.cpp')
-rw-r--r-- | src/newgrf_engine.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index dba05ebc4..dc0e1cfe0 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -1236,8 +1236,7 @@ void CommitVehicleListOrderChanges() { /* Pre-sort engines by scope-grfid and local index */ std::vector<EngineID> ordering; - Engine *e; - FOR_ALL_ENGINES(e) { + for (const Engine *e : Engine::Iterate()) { ordering.push_back(e->index); } std::sort(ordering.begin(), ordering.end(), EnginePreSort); |