From 41232f18c18c9ca444282a9e959b7dfd6c93eff5 Mon Sep 17 00:00:00 2001 From: glx Date: Mon, 16 Dec 2019 20:56:10 +0100 Subject: Codechange: Replace network related FOR_ALL with range-based for loops --- src/script/api/script_clientlist.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/script/api') 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); } } -- cgit v1.2.3-70-g09d2