From b935a747829c1bc2255cb3a1a0c91d91d0b5a380 Mon Sep 17 00:00:00 2001 From: truelight Date: Sun, 4 Nov 2007 23:06:39 +0000 Subject: (svn r11383) -Codechange: fixed all the mess around KillFirstBit (tnx to Rubidium and skidd13) --- src/rail.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rail.h') diff --git a/src/rail.h b/src/rail.h index de1d1d82d..00adf6183 100644 --- a/src/rail.h +++ b/src/rail.h @@ -370,7 +370,7 @@ static inline Track FindFirstTrack(TrackBits tracks) */ static inline Track TrackBitsToTrack(TrackBits tracks) { - assert(tracks == INVALID_TRACK_BIT || (tracks != TRACK_BIT_NONE && KILL_FIRST_BIT(tracks & TRACK_BIT_MASK) == 0)); + assert(tracks == INVALID_TRACK_BIT || (tracks != TRACK_BIT_NONE && KillFirstBit(tracks & TRACK_BIT_MASK) == TRACK_BIT_NONE)); return tracks != INVALID_TRACK_BIT ? (Track)FIND_FIRST_BIT(tracks & TRACK_BIT_MASK) : INVALID_TRACK; } @@ -785,7 +785,7 @@ static inline bool HasPowerOnRail(RailType enginetype, RailType tiletype) static inline bool TracksOverlap(TrackBits bits) { /* With no, or only one track, there is no overlap */ - if (bits == 0 || KILL_FIRST_BIT(bits) == 0) return false; + if (bits == TRACK_BIT_NONE || KillFirstBit(bits) == TRACK_BIT_NONE) return false; /* We know that there are at least two tracks present. When there are more * than 2 tracks, they will surely overlap. When there are two, they will * always overlap unless they are lower & upper or right & left. */ -- cgit v1.2.3-54-g00ecf