Codechange: Standardise how AllocateSpecToStation/RoadStop are called. (#14525)
Replace use of negative value with std::optional and update doxygen.
This commit is contained in:
@@ -136,7 +136,8 @@ void MoveWaypointsToBaseStations()
|
||||
SetRailStationReservation(tile, reserved);
|
||||
|
||||
if (wp.spec != nullptr) {
|
||||
SetCustomStationSpecIndex(tile, AllocateSpecToStation(wp.spec, new_wp, true));
|
||||
auto specindex = AllocateSpecToStation(wp.spec, new_wp, true);
|
||||
SetCustomStationSpecIndex(tile, specindex.value_or(0));
|
||||
}
|
||||
new_wp->rect.BeforeAddTile(tile, StationRect::ADD_FORCE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user