Codechange: replace INVALID_X with XID::Invalid() for PoolIDs
This commit is contained in:
@@ -159,7 +159,7 @@ public:
|
||||
|
||||
default:
|
||||
this->dest_tile = v->dest_tile;
|
||||
this->dest_station_id = INVALID_STATION;
|
||||
this->dest_station_id = StationID::Invalid();
|
||||
this->dest_trackdirs = TrackStatusToTrackdirBits(GetTileTrackStatus(v->dest_tile, TRANSPORT_RAIL, 0));
|
||||
break;
|
||||
}
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
/** Called by YAPF to detect if node ends in the desired destination */
|
||||
inline bool PfDetectDestination(TileIndex tile, Trackdir td)
|
||||
{
|
||||
if (this->dest_station_id != INVALID_STATION) {
|
||||
if (this->dest_station_id != StationID::Invalid()) {
|
||||
return HasStationTileRail(tile)
|
||||
&& (GetStationIndex(tile) == this->dest_station_id)
|
||||
&& (GetRailStationTrack(tile) == TrackdirToTrack(td));
|
||||
|
||||
@@ -253,7 +253,7 @@ public:
|
||||
this->non_artic = !v->HasArticulatedPart();
|
||||
this->dest_trackdirs = INVALID_TRACKDIR_BIT;
|
||||
} else {
|
||||
this->dest_station = INVALID_STATION;
|
||||
this->dest_station = StationID::Invalid();
|
||||
this->dest_tile = v->dest_tile;
|
||||
this->dest_trackdirs = TrackStatusToTrackdirBits(GetTileTrackStatus(v->dest_tile, TRANSPORT_ROAD, GetRoadTramType(v->roadtype)));
|
||||
}
|
||||
@@ -261,7 +261,7 @@ public:
|
||||
|
||||
const Station *GetDestinationStation() const
|
||||
{
|
||||
return this->dest_station != INVALID_STATION ? Station::GetIfValid(this->dest_station) : nullptr;
|
||||
return this->dest_station != StationID::Invalid() ? Station::GetIfValid(this->dest_station) : nullptr;
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -280,7 +280,7 @@ public:
|
||||
|
||||
inline bool PfDetectDestinationTile(TileIndex tile, Trackdir trackdir)
|
||||
{
|
||||
if (this->dest_station != INVALID_STATION) {
|
||||
if (this->dest_station != StationID::Invalid()) {
|
||||
return IsTileType(tile, MP_STATION) &&
|
||||
GetStationIndex(tile) == this->dest_station &&
|
||||
(this->station_type == GetStationType(tile)) &&
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
this->dest_tile = CalcClosestStationTile(this->dest_station, v->tile, StationType::Dock);
|
||||
this->dest_trackdirs = INVALID_TRACKDIR_BIT;
|
||||
} else {
|
||||
this->dest_station = INVALID_STATION;
|
||||
this->dest_station = StationID::Invalid();
|
||||
this->dest_tile = v->dest_tile;
|
||||
this->dest_trackdirs = TrackStatusToTrackdirBits(GetTileTrackStatus(v->dest_tile, TRANSPORT_WATER, 0));
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
return GetWaterRegionPatchInfo(tile) == this->intermediate_dest_region_patch;
|
||||
}
|
||||
|
||||
if (this->dest_station != INVALID_STATION) return IsDockingTile(tile) && IsShipDestinationTile(tile, this->dest_station);
|
||||
if (this->dest_station != StationID::Invalid()) return IsDockingTile(tile) && IsShipDestinationTile(tile, this->dest_station);
|
||||
|
||||
return tile == this->dest_tile && ((this->dest_trackdirs & TrackdirToTrackdirBits(trackdir)) != TRACKDIR_BIT_NONE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user