From ddabfed1cd3efa9ee229214207a60fc7cb3e0641 Mon Sep 17 00:00:00 2001 From: glx Date: Sun, 15 Dec 2019 05:55:59 +0100 Subject: Codechange: Replace station related FOR_ALL with range-based for loops --- src/network/network_server.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/network/network_server.cpp') diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index a8322ff90..7eabf24f5 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -1547,7 +1547,6 @@ void NetworkSocketHandler::SendCompanyInformation(Packet *p, const Company *c, c void NetworkPopulateCompanyStats(NetworkCompanyStats *stats) { const Vehicle *v; - const Station *s; memset(stats, 0, sizeof(*stats) * MAX_COMPANIES); @@ -1566,7 +1565,7 @@ void NetworkPopulateCompanyStats(NetworkCompanyStats *stats) } /* Go through all stations and count the types of stations */ - FOR_ALL_STATIONS(s) { + for (const Station *s : Station::Iterate()) { if (Company::IsValidID(s->owner)) { NetworkCompanyStats *npi = &stats[s->owner]; -- cgit v1.2.3-54-g00ecf