arm64 : fix intptr_t size

This commit is contained in:
hymei
2022-02-23 19:50:30 +08:00
committed by nillerusr
parent 2690e6c85a
commit 4e4039d756
143 changed files with 1015 additions and 674 deletions

View File

@@ -754,12 +754,20 @@ BASEPTR CBaseEntity::ThinkSet( BASEPTR func, float thinkTime, const char *szCont
{
#if !defined( CLIENT_DLL )
#ifdef _DEBUG
#ifdef PLATFORM_64BITS
#ifdef GNUC
COMPILE_TIME_ASSERT( sizeof(func) == 16 );
#else
COMPILE_TIME_ASSERT( sizeof(func) == 8 );
#endif
#else
#ifdef GNUC
COMPILE_TIME_ASSERT( sizeof(func) == 8 );
#else
COMPILE_TIME_ASSERT( sizeof(func) == 4 );
#endif
#endif
#endif
#endif
// Old system?

View File

@@ -115,7 +115,7 @@ private:
static unsigned int KeyFunc( const HashEntry &src )
{
// Shift right to get rid of alignment bits and border the struct on a 16 byte boundary
return (unsigned int)src.key;
return (unsigned int)(uintp)src.key;
}
CUtlHash< HashEntry > m_HashTable;

View File

@@ -45,7 +45,7 @@ void QueryCacheKey_t::ComputeHashIndex( void )
for( int i = 0 ; i < m_nNumValidPoints; i++ )
{
ret += ( unsigned int ) m_pEntities[i].ToInt();
ret += ( unsigned int ) m_nOffsetMode;
ret += ( uintp ) m_nOffsetMode;
}
ret += *( ( uint32 *) &m_flMinimumUpdateInterval );
ret += m_nTraceMask;

View File

@@ -91,6 +91,7 @@ static int gSizes[FIELD_TYPECOUNT] =
FIELD_SIZE( FIELD_MATERIALINDEX ),
FIELD_SIZE( FIELD_VECTOR2D ),
FIELD_SIZE( FIELD_INTEGER64 ),
};