summaryrefslogtreecommitdiff
path: root/src/rail.h
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-11-04 23:06:39 +0000
committertruelight <truelight@openttd.org>2007-11-04 23:06:39 +0000
commit4b8aaa994c3f79ba360bc2e3535f7319b09ef0a9 (patch)
treeb50a237674dc49109595b0832ab58f70e3f9af9c /src/rail.h
parent69b1d97c0348229bf1ff14a672d7e50aa3d9eb3f (diff)
downloadopenttd-4b8aaa994c3f79ba360bc2e3535f7319b09ef0a9.tar.xz
(svn r11383) -Codechange: fixed all the mess around KillFirstBit (tnx to Rubidium and skidd13)
Diffstat (limited to 'src/rail.h')
-rw-r--r--src/rail.h4
1 files changed, 2 insertions, 2 deletions
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. */