Codechange: Split CT_INVALID into CT_INVALID and INVALID_CARGO.
INVALID_CARGO is a CargoID and should be used for most purposes in game. CT_INVALID is a CargoType used for defining default properties.
This commit is contained in:
committed by
Peter Nelson
parent
4fd986bd07
commit
952d111b94
@@ -69,10 +69,12 @@ enum CargoType {
|
||||
CT_INVALID = 0xFF, ///< Invalid cargo type.
|
||||
};
|
||||
|
||||
static const CargoID INVALID_CARGO = UINT8_MAX;
|
||||
|
||||
/** Test whether cargo type is not CT_INVALID */
|
||||
inline bool IsValidCargoType(CargoType t) { return t != CT_INVALID; }
|
||||
/** Test whether cargo type is not CT_INVALID */
|
||||
inline bool IsValidCargoID(CargoID t) { return t != CT_INVALID; }
|
||||
/** Test whether cargo type is not INVALID_CARGO */
|
||||
inline bool IsValidCargoID(CargoID t) { return t != INVALID_CARGO; }
|
||||
|
||||
typedef uint64_t CargoTypes;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user