summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-12-15 05:55:59 +0100
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-12-21 20:13:03 +0100
commitddabfed1cd3efa9ee229214207a60fc7cb3e0641 (patch)
tree824eddd3155d04363864731a43a6863cd7fbd2a3 /src/network
parent3a14cea068d130e11b5d9dde11d4451dd7dec453 (diff)
downloadopenttd-ddabfed1cd3efa9ee229214207a60fc7cb3e0641.tar.xz
Codechange: Replace station related FOR_ALL with range-based for loops
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_server.cpp3
1 files changed, 1 insertions, 2 deletions
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];