Codechange: strongly type StationID
This commit is contained in:
+2
-2
@@ -3728,7 +3728,7 @@ static VehicleEnterTileStatus VehicleEnter_Station(Vehicle *v, TileIndex tile, i
|
||||
stop &= TILE_SIZE - 1;
|
||||
|
||||
if (x == stop) {
|
||||
return VETSB_ENTERED_STATION | (VehicleEnterTileStatus)(station_id << VETS_STATION_ID_OFFSET); // enter station
|
||||
return VETSB_ENTERED_STATION | static_cast<VehicleEnterTileStatus>(station_id.base() << VETS_STATION_ID_OFFSET); // enter station
|
||||
} else if (x < stop) {
|
||||
v->vehstatus |= VS_TRAIN_SLOWING;
|
||||
uint16_t spd = std::max(0, (stop - x) * 20 - 15);
|
||||
@@ -5073,7 +5073,7 @@ StationIDStack FlowStatMap::DeleteFlows(StationID via)
|
||||
FlowStat &s_flows = f_it->second;
|
||||
s_flows.ChangeShare(via, INT_MIN);
|
||||
if (s_flows.GetShares()->empty()) {
|
||||
ret.Push(f_it->first);
|
||||
ret.Push(f_it->first.base());
|
||||
this->erase(f_it++);
|
||||
} else {
|
||||
++f_it;
|
||||
|
||||
Reference in New Issue
Block a user