From 63da7ffda03380e4bd6e2b6aec29f3fcc115256d Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 18 Apr 2020 15:12:34 +0200 Subject: [PATCH] Fix start value not working on Enum. --- src/Enum.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Enum.hpp b/src/Enum.hpp index cd58b8c..e08aef2 100644 --- a/src/Enum.hpp +++ b/src/Enum.hpp @@ -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(*input) + 33 * ConstHash(input + 1) : 5381; \