Add CUtlSymbolTableLargeBase::m_nBytesAccumulated member

This commit is contained in:
GAMMACASE 2025-08-02 16:40:07 +03:00
parent 5b7c3197d7
commit c5461e58ac

View File

@ -131,7 +131,8 @@ public:
m_Mutex( "CUtlSymbolTableLargeBase" ),
m_MemBlockAllocator( ( nInitSize > 0 ) ? 8 : 0, PAGE_SIZE ),
m_nElementLimit( INT_MAX - 1 ),
m_bThrowError( true ) { }
m_bThrowError( true ),
m_nBytesAccumulated( 0 ) { }
~CUtlSymbolTableLargeBase() { }
@ -210,6 +211,7 @@ private:
CUtlMemoryBlockAllocator<byte> m_MemBlockAllocator;
int m_nElementLimit;
bool m_bThrowError;
int m_nBytesAccumulated;
};
template < bool CASEINSENSITIVE, size_t PAGE_SIZE, class MUTEX_TYPE >
@ -257,6 +259,8 @@ inline CUtlSymbolLarge CUtlSymbolTableLargeBase< CASEINSENSITIVE, PAGE_SIZE, MUT
V_memmove( pText, pString, nLength );
pText[ nLength ] = '\0';
m_nBytesAccumulated += nLength + 1;
UtlSymLargeId_t id = m_MemBlocks.AddToTail( block + sizeof( LargeSymbolTableHashDecoration_t ) );
UtlSymTableLargeAltKey key;