Adds function to ConstString to just get the hash of a value.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-02-29 14:11:55 +01:00
parent 4c36946496
commit 209e802699
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 3 additions and 0 deletions

View File

@ -47,6 +47,9 @@
} \
inline constexpr bool operator==(const char* rhs) const { return _hash == Hash(rhs); } \
inline constexpr bool operator!=(const char* rhs) const { return _hash != Hash(rhs); } \
\
inline static constexpr uint32_t GetHash(const char* val) { return Hash(val); } \
inline static STDSTRINGCONSTEXPR uint32_t GetHash(const std::string& val) { return Hash(val.c_str()); } \
}; \
} \
\