mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-17 01:12:39 +01:00
Codechange: Replace station related FOR_ALL with range-based for loops
This commit is contained in:
@@ -119,7 +119,6 @@ enum HelicopterRotorStates {
|
||||
*/
|
||||
static StationID FindNearestHangar(const Aircraft *v)
|
||||
{
|
||||
const Station *st;
|
||||
uint best = 0;
|
||||
StationID index = INVALID_STATION;
|
||||
TileIndex vtile = TileVirtXY(v->x_pos, v->y_pos);
|
||||
@@ -140,7 +139,7 @@ static StationID FindNearestHangar(const Aircraft *v)
|
||||
}
|
||||
}
|
||||
|
||||
FOR_ALL_STATIONS(st) {
|
||||
for (const Station *st : Station::Iterate()) {
|
||||
if (st->owner != v->owner || !(st->facilities & FACIL_AIRPORT) || !st->airport.HasHangar()) continue;
|
||||
|
||||
const AirportFTAClass *afc = st->airport.GetFTA();
|
||||
|
||||
Reference in New Issue
Block a user