(svn r19792) -Change: use the typed FOR_EACH_SET_BIT for Tracks (adf88)

This commit is contained in:
rubidium
2010-05-11 21:02:26 +00:00
parent fe71d4fc99
commit 99ecfe4061
5 changed files with 36 additions and 29 deletions

View File

@@ -3517,11 +3517,8 @@ static void DeleteLastWagon(Train *v)
/* It is important that these two are the first in the loop, as reservation cannot deal with every trackbit combination */
assert(TRACK_BEGIN == TRACK_X && TRACK_Y == TRACK_BEGIN + 1);
for (Track t = TRACK_BEGIN; t < TRACK_END; t++) {
if (HasBit(remaining_trackbits, t)) {
TryReserveRailTrack(tile, t);
}
}
Track t;
FOR_EACH_SET_TRACK(t, remaining_trackbits) TryReserveRailTrack(tile, t);
}
/* check if the wagon was on a road/rail-crossing */