summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 15e95e4d2..023ad9890 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -8902,8 +8902,7 @@ static void CalculateRefitMasks()
if (cargo_map_for_first_refittable != nullptr) {
/* Use first refittable cargo from cargo translation table */
byte best_local_slot = 0xFF;
- CargoID cargo_type;
- FOR_EACH_SET_CARGO_ID(cargo_type, ei->refit_mask) {
+ for (CargoID cargo_type : SetCargoBitIterator(ei->refit_mask)) {
byte local_slot = cargo_map_for_first_refittable[cargo_type];
if (local_slot < best_local_slot) {
best_local_slot = local_slot;