From 038ac6bb337ffa4bedc28b2cd405ba8b23fecbe2 Mon Sep 17 00:00:00 2001 From: GAMMACASE <31375974+GAMMACASE@users.noreply.github.com> Date: Mon, 5 Oct 2026 21:13:33 +0300 Subject: [PATCH] Make CUtlStringToken constexpr compatible --- public/tier1/utlstringtoken.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/tier1/utlstringtoken.h b/public/tier1/utlstringtoken.h index 94b56d9d..a0bd1653 100644 --- a/public/tier1/utlstringtoken.h +++ b/public/tier1/utlstringtoken.h @@ -34,7 +34,7 @@ public: FORCEINLINE CUtlStringToken( uint32 nHashCode = 0 ) : m_nHashCode( nHashCode ) {} template - 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