Fix start value not working on Enum.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-04-18 15:12:34 +02:00
parent bc64e35c8a
commit 63da7ffda0
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 3 additions and 1 deletions

View File

@ -48,7 +48,9 @@
*/
#define ENUM_WITH_START_VALUE(name, type, startValue, values...) \
enum class name : type { MACRO_UTILS_FOR_EACH_WITH_VALUE(ENUM_VALUE, ___MACRO_UTILS_NARGS(values) - 1, values) }; \
enum class name : type { \
MACRO_UTILS_FOR_EACH_WITH_VALUE(ENUM_VALUE, startValue + ___MACRO_UTILS_NARGS(values) - 1, values) \
}; \
class name##Helper { \
inline static uint32_t constexpr ConstHash(char const* input) { \
return *input ? static_cast<uint32_t>(*input) + 33 * ConstHash(input + 1) : 5381; \