|
ManaPlus
|
Go to the documentation of this file.
22 #ifndef ENUMS_SIMPLETYPES_INTDEFINES_H
23 #define ENUMS_SIMPLETYPES_INTDEFINES_H
29 #define defIntEnum(name, type) \
30 enum class name : type \
33 const name name##_zero = static_cast<name>(0); \
34 const name name##_one = static_cast<name>(1)
36 #define fromInt(val, name) static_cast<name>(val)
37 #define toInt(val, name) static_cast<name>(val)
38 #define defIntEnumNeg(name) const name name##_negOne = static_cast<name>(-1)
42 #define defIntEnum(name, type) \
44 const name name##_zero = 0; \
45 const name name##_one = 1
46 #define fromInt(val, name) static_cast<name>(val)
47 #define toInt(val, name) static_cast<name>(val)
48 #define defIntEnumNeg(name) const name name##_negOne = -1