diff options
author | Niels Martin Hansen <nielsm@indvikleren.dk> | 2018-07-26 23:09:35 +0200 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2018-11-03 21:43:54 +0100 |
commit | 9b560eaa518124398129f19b58735c73f9677ce0 (patch) | |
tree | 9dffda8b55a8709e62c95d17f2f9c8c2a3c667b9 /src/cargo_type.h | |
parent | e66cec8f86357918c58b20bd3cc67330f277a5e1 (diff) | |
download | openttd-9b560eaa518124398129f19b58735c73f9677ce0.tar.xz |
Fix: Industry chain window layout no more unnecessarily large when the number of cargoes in/out isn't large either
Diffstat (limited to 'src/cargo_type.h')
-rw-r--r-- | src/cargo_type.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cargo_type.h b/src/cargo_type.h index 1eca0edff..79d1c84f4 100644 --- a/src/cargo_type.h +++ b/src/cargo_type.h @@ -70,6 +70,11 @@ enum CargoType { CT_INVALID = 0xFF, ///< Invalid cargo type. }; +/** Test whether cargo type is not CT_INVALID */ +inline bool IsCargoTypeValid(CargoType t) { return t != CT_INVALID; } +/** Test whether cargo type is not CT_INVALID */ +inline bool IsCargoIDValid(CargoID t) { return t != CT_INVALID; } + typedef uint64 CargoTypes; static const CargoTypes ALL_CARGOTYPES = (CargoTypes)UINT64_MAX; |