summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJ0anJosep <juanjo.ng.83@gmail.com>2018-04-30 18:37:45 +0200
committerfrosch <github@elsenhans.name>2018-06-27 23:14:30 +0200
commit4189cb85ba054d0f41ec0b64a9323e63e49f2afc (patch)
tree4e8c2eddd44898f26518c7fb23f2cf74f948663d /src
parentd01c09fb73aacd1b3c204829e7c574bbde09153f (diff)
downloadopenttd-4189cb85ba054d0f41ec0b64a9323e63e49f2afc.tar.xz
Codechange: Use HasTracks with TrackStatus.
Diffstat (limited to 'src')
-rw-r--r--src/pbs.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pbs.cpp b/src/pbs.cpp
index 133293909..6bb35a696 100644
--- a/src/pbs.cpp
+++ b/src/pbs.cpp
@@ -81,7 +81,7 @@ void SetRailStationPlatformReservation(TileIndex start, DiagDirection dir, bool
*/
bool TryReserveRailTrack(TileIndex tile, Track t, bool trigger_stations)
{
- assert((GetTileTrackStatus(tile, TRANSPORT_RAIL, 0) & TrackToTrackBits(t)) != 0);
+ assert(HasTrack(TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_RAIL, 0)), t));
if (_settings_client.gui.show_track_reservation) {
/* show the reserved rail if needed */
@@ -142,7 +142,7 @@ bool TryReserveRailTrack(TileIndex tile, Track t, bool trigger_stations)
*/
void UnreserveRailTrack(TileIndex tile, Track t)
{
- assert((GetTileTrackStatus(tile, TRANSPORT_RAIL, 0) & TrackToTrackBits(t)) != 0);
+ assert(HasTrack(TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_RAIL, 0)), t));
if (_settings_client.gui.show_track_reservation) {
if (IsBridgeTile(tile)) {