diff options
author | glx <glx@openttd.org> | 2019-12-15 05:55:59 +0100 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-12-21 20:13:03 +0100 |
commit | ddabfed1cd3efa9ee229214207a60fc7cb3e0641 (patch) | |
tree | 824eddd3155d04363864731a43a6863cd7fbd2a3 /src/script/api/script_stationlist.cpp | |
parent | 3a14cea068d130e11b5d9dde11d4451dd7dec453 (diff) | |
download | openttd-ddabfed1cd3efa9ee229214207a60fc7cb3e0641.tar.xz |
Codechange: Replace station related FOR_ALL with range-based for loops
Diffstat (limited to 'src/script/api/script_stationlist.cpp')
-rw-r--r-- | src/script/api/script_stationlist.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/api/script_stationlist.cpp b/src/script/api/script_stationlist.cpp index 9c2a56da9..9b9e67e7a 100644 --- a/src/script/api/script_stationlist.cpp +++ b/src/script/api/script_stationlist.cpp @@ -18,8 +18,7 @@ ScriptStationList::ScriptStationList(ScriptStation::StationType station_type) { - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { if ((st->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY) && (st->facilities & station_type) != 0) this->AddItem(st->index); } } |