1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-20 10:52:41 +01:00

Codechange: Remove StationIDStack and SmallStack.

Use a std::vector or std::span instead.
This commit is contained in:
Peter Nelson
2025-10-11 17:00:40 +01:00
committed by Peter Nelson
parent 5c89dff677
commit fd32d1447e
13 changed files with 49 additions and 318 deletions

View File

@@ -135,7 +135,8 @@ static StationID FindNearestHangar(const Aircraft *v)
next_dest = Station::GetIfValid(v->current_order.GetDestination().ToStationID());
} else {
last_dest = GetTargetAirportIfValid(v);
next_dest = Station::GetIfValid(v->GetNextStoppingStation().value);
std::vector<StationID> next_station = v->GetNextStoppingStation();
if (!next_station.empty()) next_dest = Station::GetIfValid(next_station.back());
}
}