Codechange: Replace FOR_ALL_ENGINES with range-based for loops

This commit is contained in:
glx
2019-12-15 22:45:18 +01:00
committed by Niels Martin Hansen
parent 1c92ba8ebe
commit 1f6b3a37f9
16 changed files with 50 additions and 81 deletions

View File

@@ -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) {