1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2026-10-10 03:43:06 +08:00

Make CUtlStringToken constexpr compatible

This commit is contained in:
GAMMACASE
2026-10-05 21:13:33 +03:00
parent 02e09c4d03
commit ea67505bb3
+1 -1
View File
@@ -34,7 +34,7 @@ public:
FORCEINLINE CUtlStringToken( uint32 nHashCode = 0 ) : m_nHashCode( nHashCode ) {}
template <size_t N>
FORCEINLINE CUtlStringToken( const char (&str)[N] ) : m_nHashCode( MurmurHash2LowerCase( str, STRINGTOKEN_MURMURHASH_SEED ) ) { }
constexpr FORCEINLINE CUtlStringToken( const char (&str)[N] ) : m_nHashCode( MurmurHash2LowerCase( str, STRINGTOKEN_MURMURHASH_SEED ) ) { }
// AMNOTE: Template is required to enforce compiler to pick the correct overload when inlining
// as otherwise non templated overload would always win the pick thus no const folding would happen