1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-20 04:26:03 +08:00

Modified SDK for GCC 4.1

This commit is contained in:
Scott Ehlert
2008-09-15 01:33:59 -05:00
parent 325306db96
commit 4c2b8fd6c4
543 changed files with 100067 additions and 91817 deletions

View File

@ -109,7 +109,9 @@ void CPredictableId::ResetInstanceCounters( void )
//-----------------------------------------------------------------------------
bool CPredictableId::IsActive( void ) const
{
if ( *(const int *)&m_PredictableID == 0 )
const void *predict = &m_PredictableID;
if (*reinterpret_cast<const int *>(predict) == 0)
return false;
return true;
@ -267,7 +269,8 @@ bool CPredictableId::GetAcknowledged( void ) const
//-----------------------------------------------------------------------------
int CPredictableId::GetRaw( void ) const
{
return *(int *)&m_PredictableID;
const void *predict = &m_PredictableID;
return *reinterpret_cast<const int *>(predict);
}
//-----------------------------------------------------------------------------
@ -276,7 +279,8 @@ int CPredictableId::GetRaw( void ) const
//-----------------------------------------------------------------------------
void CPredictableId::SetRaw( int raw )
{
*(int *)&m_PredictableID = raw;
void *predict = &m_PredictableID;
*reinterpret_cast<int *>(predict) = raw;
}
//-----------------------------------------------------------------------------