summaryrefslogtreecommitdiff
path: root/src/newgrf_engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf_engine.cpp')
-rw-r--r--src/newgrf_engine.cpp3
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);