diff options
author | glx <glx@openttd.org> | 2019-12-16 18:01:57 +0100 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-12-21 20:13:03 +0100 |
commit | 4ae829cb272225c7e07e233a94c2d945077f432a (patch) | |
tree | fc762bd9bf0280661663fd136dd68a444fef734d /src/script/api | |
parent | f58ce3db19be038e2a0725b2dd28de9d6c27d416 (diff) | |
download | openttd-4ae829cb272225c7e07e233a94c2d945077f432a.tar.xz |
Codechange: Replace FOR_ALL_GROUPS with range-based for loops
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/script_grouplist.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/api/script_grouplist.cpp b/src/script/api/script_grouplist.cpp index 2a99caf33..569b44634 100644 --- a/src/script/api/script_grouplist.cpp +++ b/src/script/api/script_grouplist.cpp @@ -15,8 +15,7 @@ ScriptGroupList::ScriptGroupList() { - Group *g; - FOR_ALL_GROUPS(g) { + for (const Group *g : Group::Iterate()) { if (g->owner == ScriptObject::GetCompany()) this->AddItem(g->index); } } |