diff options
author | rubidium <rubidium@openttd.org> | 2010-05-11 21:02:26 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-05-11 21:02:26 +0000 |
commit | 99ecfe4061f8e6404e18f5fcef7cdb13990fb252 (patch) | |
tree | ff8efd450c34ac3fdc6e1a3e62316a54a70c2573 /src/pathfinder/npf | |
parent | fe71d4fc99aa74c504de0ce3c80cb318903bddf7 (diff) | |
download | openttd-99ecfe4061f8e6404e18f5fcef7cdb13990fb252.tar.xz |
(svn r19792) -Change: use the typed FOR_EACH_SET_BIT for Tracks (adf88)
Diffstat (limited to 'src/pathfinder/npf')
-rw-r--r-- | src/pathfinder/npf/npf.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp index 05ff2f4b0..1e656e547 100644 --- a/src/pathfinder/npf/npf.cpp +++ b/src/pathfinder/npf/npf.cpp @@ -921,9 +921,9 @@ static void NPFFollowTrack(AyStar *aystar, OpenListNode *current) TrackBits reserved = GetReservedTrackbits(dst_tile); trackdirbits &= ~TrackBitsToTrackdirBits(reserved); - int i; - FOR_EACH_SET_BIT(i, TrackdirBitsToTrackBits(trackdirbits)) { - if (TracksOverlap(reserved | TrackToTrackBits((Track)i))) trackdirbits &= ~TrackToTrackdirBits((Track)i); + Track t; + FOR_EACH_SET_TRACK(t, TrackdirBitsToTrackBits(trackdirbits)) { + if (TracksOverlap(reserved | TrackToTrackBits(t))) trackdirbits &= ~TrackToTrackdirBits(t); } } |