summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2021-06-13 04:29:24 +0200
committerLoïc Guilloux <glx22@users.noreply.github.com>2021-07-09 21:36:09 +0200
commita543a4b7bb0d869800591ec1504b3934b68ecd8f (patch)
treeb3c63e456cf0e544c2ec6301d85f34c7dea9d6d2 /src/newgrf.cpp
parent89ab8b79a51b4963da55dce195ea1ab520c73b50 (diff)
downloadopenttd-a543a4b7bb0d869800591ec1504b3934b68ecd8f.tar.xz
Codechange: Remove FOR_EACH_SET_CARGO_ID
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;