summaryrefslogtreecommitdiff
path: root/src/cargotype.h
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/cargotype.h
parent89ab8b79a51b4963da55dce195ea1ab520c73b50 (diff)
downloadopenttd-a543a4b7bb0d869800591ec1504b3934b68ecd8f.tar.xz
Codechange: Remove FOR_EACH_SET_CARGO_ID
Diffstat (limited to 'src/cargotype.h')
-rw-r--r--src/cargotype.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cargotype.h b/src/cargotype.h
index c93feea75..a398d6079 100644
--- a/src/cargotype.h
+++ b/src/cargotype.h
@@ -15,6 +15,7 @@
#include "gfx_type.h"
#include "strings_type.h"
#include "landscape_type.h"
+#include "core/bitmath_func.hpp"
#include "core/span_type.hpp"
#include <vector>
@@ -195,6 +196,6 @@ static inline bool IsCargoInClass(CargoID c, CargoClass cc)
return (CargoSpec::Get(c)->classes & cc) != 0;
}
-#define FOR_EACH_SET_CARGO_ID(var, cargo_bits) FOR_EACH_SET_BIT_EX(CargoID, var, CargoTypes, cargo_bits)
+using SetCargoBitIterator = SetBitIterator<CargoID, CargoTypes>;
#endif /* CARGOTYPE_H */