1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 18:32:35 +01:00

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

This commit is contained in:
glx
2019-12-15 05:55:59 +01:00
committed by Niels Martin Hansen
parent 3a14cea068
commit ddabfed1cd
27 changed files with 76 additions and 151 deletions

View File

@@ -346,8 +346,7 @@
}
int num = 0;
const Station *st;
FOR_ALL_STATIONS(st) {
for (const Station *st : Station::Iterate()) {
if (st->town == t && (st->facilities & FACIL_AIRPORT) && st->airport.type != AT_OILRIG) num++;
}
return max(0, 2 - num);