mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 12:06:07 +08:00
Modified SDK for GCC 4.2
This commit is contained in:
@ -355,26 +355,26 @@ public:
|
||||
#ifdef _DEBUG
|
||||
CRefDebug()
|
||||
{
|
||||
AssertMsg( GetRefCount() == 1, "Expected initial ref count of 1" );
|
||||
AssertMsg( this->GetRefCount() == 1, "Expected initial ref count of 1" );
|
||||
DevMsg( "%s:create 0x%x\n", ( pszName ) ? pszName : "", this );
|
||||
}
|
||||
|
||||
virtual ~CRefDebug()
|
||||
{
|
||||
AssertDevMsg( GetRefCount() == FINAL_REFS, "Object still referenced on destroy?" );
|
||||
AssertDevMsg( this->GetRefCount() == FINAL_REFS, "Object still referenced on destroy?" );
|
||||
DevMsg( "%s:destroy 0x%x\n", ( pszName ) ? pszName : "", this );
|
||||
}
|
||||
|
||||
int AddRef()
|
||||
{
|
||||
DevMsg( "%s:(0x%x)->AddRef() --> %d\n", ( pszName ) ? pszName : "", this, GetRefCount() + 1 );
|
||||
DevMsg( "%s:(0x%x)->AddRef() --> %d\n", ( pszName ) ? pszName : "", this, this->GetRefCount() + 1 );
|
||||
return BASE_REFCOUNTED::AddRef();
|
||||
}
|
||||
|
||||
int Release()
|
||||
{
|
||||
DevMsg( "%s:(0x%x)->Release() --> %d\n", ( pszName ) ? pszName : "", this, GetRefCount() - 1 );
|
||||
Assert( GetRefCount() > 0 );
|
||||
DevMsg( "%s:(0x%x)->Release() --> %d\n", ( pszName ) ? pszName : "", this, this->GetRefCount() - 1 );
|
||||
Assert( this->GetRefCount() > 0 );
|
||||
return BASE_REFCOUNTED::Release();
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user