Fix: Industry chain window layout no more unnecessarily large when the number of cargoes in/out isn't large either

This commit is contained in:
Niels Martin Hansen
2018-07-26 23:09:35 +02:00
parent e66cec8f86
commit 9b560eaa51
2 changed files with 38 additions and 26 deletions

View File

@@ -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;