summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/script_clientlist.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/script/api/script_clientlist.cpp b/src/script/api/script_clientlist.cpp
index 38d9bae49..eb57d8e44 100644
--- a/src/script/api/script_clientlist.cpp
+++ b/src/script/api/script_clientlist.cpp
@@ -18,8 +18,7 @@
ScriptClientList::ScriptClientList()
{
if (!_networking) return;
- NetworkClientInfo *ci;
- FOR_ALL_CLIENT_INFOS(ci) {
+ for (const NetworkClientInfo *ci : NetworkClientInfo::Iterate()) {
this->AddItem(ci->client_id);
}
}
@@ -36,8 +35,7 @@ ScriptClientList_Company::ScriptClientList_Company(ScriptCompany::CompanyID comp
c = (CompanyID)company;
}
- NetworkClientInfo *ci;
- FOR_ALL_CLIENT_INFOS(ci) {
+ for (const NetworkClientInfo *ci : NetworkClientInfo::Iterate()) {
if (ci->client_playas == c) this->AddItem(ci->client_id);
}
}