Codechange: Replace network related FOR_ALL with range-based for loops
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user