summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 47895122b..17e298c33 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -3485,8 +3485,7 @@ 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);
- Track t;
- FOR_EACH_SET_TRACK(t, remaining_trackbits) TryReserveRailTrack(tile, t);
+ for (Track t : SetTrackBitIterator(remaining_trackbits)) TryReserveRailTrack(tile, t);
}
/* check if the wagon was on a road/rail-crossing */