diff options
Diffstat (limited to 'MoonParser/parser.hpp')
-rw-r--r-- | MoonParser/parser.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MoonParser/parser.hpp b/MoonParser/parser.hpp index ae83215..a84b9a3 100644 --- a/MoonParser/parser.hpp +++ b/MoonParser/parser.hpp | |||
@@ -17,15 +17,15 @@ | |||
17 | #include <locale> | 17 | #include <locale> |
18 | 18 | ||
19 | // const str hash helper functions | 19 | // const str hash helper functions |
20 | inline constexpr std::size_t hash(char const* input) | 20 | inline constexpr size_t hash(char const* input) |
21 | { | 21 | { |
22 | return *input ? *input + 33ull * hash(input + 1) : 5381; | 22 | return *input ? *input + 33ull * hash(input + 1) : 5381; |
23 | } | 23 | } |
24 | inline std::size_t hash(const char* input, int size, int index) | 24 | inline size_t hash(const char* input, int size, int index) |
25 | { | 25 | { |
26 | return index < size ? input[index] + 33ull * hash(input, size, index + 1) : 5381; | 26 | return index < size ? input[index] + 33ull * hash(input, size, index + 1) : 5381; |
27 | } | 27 | } |
28 | inline std::size_t constexpr operator"" _id(const char* s, size_t) | 28 | inline size_t constexpr operator"" _id(const char* s, size_t) |
29 | { | 29 | { |
30 | return hash(s); | 30 | return hash(s); |
31 | } | 31 | } |