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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user