summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-12-16 18:01:57 +0100
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-12-21 20:13:03 +0100
commit4ae829cb272225c7e07e233a94c2d945077f432a (patch)
treefc762bd9bf0280661663fd136dd68a444fef734d /src/script
parentf58ce3db19be038e2a0725b2dd28de9d6c27d416 (diff)
downloadopenttd-4ae829cb272225c7e07e233a94c2d945077f432a.tar.xz
Codechange: Replace FOR_ALL_GROUPS with range-based for loops
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/script_grouplist.cpp3
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);
}
}