summaryrefslogtreecommitdiff
path: root/src/pathfinder/follow_track.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pathfinder/follow_track.hpp')
-rw-r--r--src/pathfinder/follow_track.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pathfinder/follow_track.hpp b/src/pathfinder/follow_track.hpp
index 33e861c41..70660d653 100644
--- a/src/pathfinder/follow_track.hpp
+++ b/src/pathfinder/follow_track.hpp
@@ -160,9 +160,9 @@ struct CFollowTrackT
/* Mask already reserved trackdirs. */
m_new_td_bits &= ~TrackBitsToTrackdirBits(reserved);
/* Mask out all trackdirs that conflict with the reservation. */
- int i;
- FOR_EACH_SET_BIT(i, TrackdirBitsToTrackBits(m_new_td_bits)) {
- if (TracksOverlap(reserved | TrackToTrackBits((Track)i))) m_new_td_bits &= ~TrackToTrackdirBits((Track)i);
+ Track t;
+ FOR_EACH_SET_TRACK(t, TrackdirBitsToTrackBits(m_new_td_bits)) {
+ if (TracksOverlap(reserved | TrackToTrackBits(t))) m_new_td_bits &= ~TrackToTrackdirBits(t);
}
if (m_new_td_bits == TRACKDIR_BIT_NONE) {
m_err = EC_RESERVED;