mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-12 09:09:09 +00:00
Codechange: Replace FOR_ALL_ENGINES with range-based for loops
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user