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

@@ -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);
}
}