Codechange: Replace network related FOR_ALL with range-based for loops

This commit is contained in:
glx
2019-12-16 20:56:10 +01:00
committed by Niels Martin Hansen
parent 09fa39c5b5
commit 41232f18c1
12 changed files with 89 additions and 191 deletions

View File

@@ -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);
}
}