(svn r11383) -Codechange: fixed all the mess around KillFirstBit (tnx to Rubidium and skidd13)

This commit is contained in:
truelight
2007-11-04 23:06:39 +00:00
parent f1df43ec21
commit b935a74782
10 changed files with 22 additions and 41 deletions

View File

@@ -2188,10 +2188,10 @@ static Track ChooseTrainTrack(Vehicle* v, TileIndex tile, DiagDirection enterdir
TIC()
#endif
assert((tracks & ~0x3F) == 0);
assert((tracks & ~TRACK_BIT_MASK) == 0);
/* quick return in case only one possible track is available */
if (KILL_FIRST_BIT(tracks) == 0) return FindFirstTrack(tracks);
if (KillFirstBit(tracks) == TRACK_BIT_NONE) return FindFirstTrack(tracks);
if (_patches.yapf.rail_use_yapf) {
Trackdir trackdir = YapfChooseRailTrack(v, tile, enterdir, tracks, &path_not_found);