mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-23 20:24:12 +01:00
Codechange: Use single vector for next station order.
Pass vector to insert into to avoid handling multiple vectors. This may change the order of returned stations.
This commit is contained in:
committed by
Peter Nelson
parent
fd32d1447e
commit
d6eff806f0
@@ -135,7 +135,8 @@ static StationID FindNearestHangar(const Aircraft *v)
|
||||
next_dest = Station::GetIfValid(v->current_order.GetDestination().ToStationID());
|
||||
} else {
|
||||
last_dest = GetTargetAirportIfValid(v);
|
||||
std::vector<StationID> next_station = v->GetNextStoppingStation();
|
||||
std::vector<StationID> next_station;
|
||||
v->GetNextStoppingStation(next_station);
|
||||
if (!next_station.empty()) next_dest = Station::GetIfValid(next_station.back());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user