mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-12-08 02:58:24 +00:00
Fix missing return of UtlSymTableLargeHashFunctor in utlsymbollarge.h (#169)
This commit is contained in:
parent
b645c0772b
commit
3600b56ccf
@ -1,4 +1,4 @@
|
||||
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
|
||||
//===== Copyright ? 1996-2005, Valve Corporation, All rights reserved. ======//
|
||||
//
|
||||
// Purpose: Defines a large symbol table (intp sized handles, can store more than 64k strings)
|
||||
//
|
||||
@ -88,39 +88,39 @@ private:
|
||||
const char* m_pString;
|
||||
};
|
||||
|
||||
inline uint32 CUtlSymbolLarge_Hash( bool CASEINSENSITIVE, const char *pString, int len )
|
||||
{
|
||||
return ( CASEINSENSITIVE ? MurmurHash2LowerCase( pString, len, 0x31415926 ) : MurmurHash2( pString, len, 0x31415926 ) );
|
||||
inline uint32 CUtlSymbolLarge_Hash( bool CASEINSENSITIVE, const char *pString, int len )
|
||||
{
|
||||
return ( CASEINSENSITIVE ? MurmurHash2LowerCase( pString, len, 0x31415926 ) : MurmurHash2( pString, len, 0x31415926 ) );
|
||||
}
|
||||
|
||||
typedef uint32 LargeSymbolTableHashDecoration_t;
|
||||
|
||||
// The structure consists of the hash immediately followed by the string data
|
||||
struct CUtlSymbolTableLargeBaseTreeEntry_t
|
||||
{
|
||||
LargeSymbolTableHashDecoration_t m_Hash;
|
||||
// Variable length string data
|
||||
char m_String[1];
|
||||
|
||||
bool IsEmpty() const
|
||||
{
|
||||
return ( ( m_Hash == 0 ) && ( 0 == m_String[0] ) );
|
||||
}
|
||||
|
||||
char const *String() const
|
||||
{
|
||||
return (const char *)&m_String[ 0 ];
|
||||
}
|
||||
|
||||
CUtlSymbolLarge ToSymbol() const
|
||||
{
|
||||
return CUtlSymbolLarge( String() );
|
||||
}
|
||||
|
||||
LargeSymbolTableHashDecoration_t HashValue() const
|
||||
{
|
||||
return m_Hash;
|
||||
}
|
||||
typedef uint32 LargeSymbolTableHashDecoration_t;
|
||||
|
||||
// The structure consists of the hash immediately followed by the string data
|
||||
struct CUtlSymbolTableLargeBaseTreeEntry_t
|
||||
{
|
||||
LargeSymbolTableHashDecoration_t m_Hash;
|
||||
// Variable length string data
|
||||
char m_String[1];
|
||||
|
||||
bool IsEmpty() const
|
||||
{
|
||||
return ( ( m_Hash == 0 ) && ( 0 == m_String[0] ) );
|
||||
}
|
||||
|
||||
char const *String() const
|
||||
{
|
||||
return (const char *)&m_String[ 0 ];
|
||||
}
|
||||
|
||||
CUtlSymbolLarge ToSymbol() const
|
||||
{
|
||||
return CUtlSymbolLarge( String() );
|
||||
}
|
||||
|
||||
LargeSymbolTableHashDecoration_t HashValue() const
|
||||
{
|
||||
return m_Hash;
|
||||
}
|
||||
};
|
||||
|
||||
// Base Class for threaded and non-threaded types
|
||||
@ -183,7 +183,7 @@ private:
|
||||
{
|
||||
CUtlSymbolTableLargeBase* pTable = (CUtlSymbolTableLargeBase*)((uintptr_t)this + m_tableOffset);
|
||||
|
||||
pTable->HashValue( k );
|
||||
return pTable->HashValue( k );
|
||||
}
|
||||
};
|
||||
|
||||
@ -375,13 +375,13 @@ inline void CUtlSymbolTableLargeBase< MutexType, CASEINSENSITIVE >::Purge()
|
||||
m_Mutex.Unlock( __FILE__, __LINE__ );
|
||||
}
|
||||
|
||||
// Case-sensitive
|
||||
typedef CUtlSymbolTableLargeBase< CThreadEmptyMutex, false > CUtlSymbolTableLarge;
|
||||
// Case-insensitive
|
||||
typedef CUtlSymbolTableLargeBase< CThreadEmptyMutex, true > CUtlSymbolTableLarge_CI;
|
||||
// Multi-threaded case-sensitive
|
||||
typedef CUtlSymbolTableLargeBase< CThreadMutex, false > CUtlSymbolTableLargeMT;
|
||||
// Multi-threaded case-insensitive
|
||||
// Case-sensitive
|
||||
typedef CUtlSymbolTableLargeBase< CThreadEmptyMutex, false > CUtlSymbolTableLarge;
|
||||
// Case-insensitive
|
||||
typedef CUtlSymbolTableLargeBase< CThreadEmptyMutex, true > CUtlSymbolTableLarge_CI;
|
||||
// Multi-threaded case-sensitive
|
||||
typedef CUtlSymbolTableLargeBase< CThreadMutex, false > CUtlSymbolTableLargeMT;
|
||||
// Multi-threaded case-insensitive
|
||||
typedef CUtlSymbolTableLargeBase< CThreadMutex, true > CUtlSymbolTableLargeMT_CI;
|
||||
|
||||
#endif // UTLSYMBOLLARGE_H
|
||||
|
||||
Loading…
Reference in New Issue
Block a user