diff --git a/public/tier1/utlhash.h b/public/tier1/utlhash.h index f1b37b2d..cc5978b6 100644 --- a/public/tier1/utlhash.h +++ b/public/tier1/utlhash.h @@ -489,7 +489,7 @@ inline void CUtlHash::Dump( ) // Number of buckets must be a power of 2. // Key must be 32-bits (unsigned int). // -typedef int UtlHashFastHandle_t; +typedef intp UtlHashFastHandle_t; #define UTLHASH_POOL_SCALAR 2 @@ -534,15 +534,15 @@ public: // int Count( void ) const; // Insertion. - UtlHashFastHandle_t Insert( unsigned int uiKey, const Data &data ); - UtlHashFastHandle_t FastInsert( unsigned int uiKey, const Data &data ); + UtlHashFastHandle_t Insert( uintp uiKey, const Data &data ); + UtlHashFastHandle_t FastInsert( uintp uiKey, const Data &data ); // Removal. void Remove( UtlHashFastHandle_t hHash ); void RemoveAll( void ); // Retrieval. - UtlHashFastHandle_t Find( unsigned int uiKey ) const; + UtlHashFastHandle_t Find( uintp uiKey ) const; Data &Element( UtlHashFastHandle_t hHash ); Data const &Element( UtlHashFastHandle_t hHash ) const; @@ -571,7 +571,7 @@ public: template struct HashFastData_t_ { - unsigned int m_uiKey; + uintp m_uiKey; HashData m_Data; }; @@ -650,7 +650,7 @@ template inline int CUtlHashFast::C // Purpose: Insert data into the hash table given its key (unsigned int), with // a check to see if the element already exists within the tree. //----------------------------------------------------------------------------- -template inline UtlHashFastHandle_t CUtlHashFast::Insert( unsigned int uiKey, const Data &data ) +template inline UtlHashFastHandle_t CUtlHashFast::Insert( uintp uiKey, const Data &data ) { // Check to see if that key already exists in the buckets (should be unique). UtlHashFastHandle_t hHash = Find( uiKey ); @@ -664,10 +664,10 @@ template inline UtlHashFastHandle_t CUtlHashFast inline UtlHashFastHandle_t CUtlHashFast::FastInsert( unsigned int uiKey, const Data &data ) +template inline UtlHashFastHandle_t CUtlHashFast::FastInsert( uintp uiKey, const Data &data ) { // Get a new element from the pool. - int iHashData = m_aDataPool.Alloc( true ); + intp iHashData = m_aDataPool.Alloc( true ); HashFastData_t *pHashData = &m_aDataPool[iHashData]; if ( !pHashData ) return InvalidHandle(); @@ -716,12 +716,12 @@ template inline void CUtlHashFast:: //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -template inline UtlHashFastHandle_t CUtlHashFast::Find( unsigned int uiKey ) const +template inline UtlHashFastHandle_t CUtlHashFast::Find( uintp uiKey ) const { // hash the "key" - get the correct hash table "bucket" int iBucket = HashFuncs::Hash( uiKey, m_uiBucketMask ); - for ( int iElement = m_aBuckets[iBucket]; iElement != m_aDataPool.InvalidIndex(); iElement = m_aDataPool.Next( iElement ) ) + for ( intp iElement = m_aBuckets[iBucket]; iElement != m_aDataPool.InvalidIndex(); iElement = m_aDataPool.Next( iElement ) ) { if ( m_aDataPool[iElement].m_uiKey == uiKey ) return iElement; @@ -832,7 +832,7 @@ template inline bool CUtlHashFast:: // Number of buckets must be a power of 2. // Key must be 32-bits (unsigned int). // -typedef int UtlHashFixedHandle_t; +typedef intp UtlHashFixedHandle_t; template class CUtlHashFixedGenericHash