Skip to content

Commit

Permalink
cast null to int in check for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
HappyDOGE committed Jul 28, 2022
1 parent 84ed551 commit 062596c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tier0/memdbg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ void *CDbgMemAlloc::Expand_NoLongerSupported( void *pMem, size_t nSize )
//-----------------------------------------------------------------------------
void CDbgMemAlloc::PushAllocDbgInfo( const char *pFileName, int nLine )
{
if ( g_DbgInfoStack == (void*)NULL )
if ( g_DbgInfoStack == (int)NULL )
{
g_DbgInfoStack = (DbgInfoStack_t *)DebugAlloc( sizeof(DbgInfoStack_t) * DBG_INFO_STACK_DEPTH );
g_nDbgInfoStackDepth = -1;
Expand All @@ -901,7 +901,7 @@ void CDbgMemAlloc::PushAllocDbgInfo( const char *pFileName, int nLine )

void CDbgMemAlloc::PopAllocDbgInfo()
{
if ( g_DbgInfoStack == (void*)NULL )
if ( g_DbgInfoStack == (int)NULL )
{
g_DbgInfoStack = (DbgInfoStack_t *)DebugAlloc( sizeof(DbgInfoStack_t) * DBG_INFO_STACK_DEPTH );
g_nDbgInfoStackDepth = -1;
Expand All @@ -922,7 +922,7 @@ uint32 CDbgMemAlloc::GetDebugInfoSize()

void CDbgMemAlloc::SaveDebugInfo( void *pvDebugInfo )
{
if ( g_DbgInfoStack == (void*)NULL )
if ( g_DbgInfoStack == (int)NULL )
{
g_DbgInfoStack = (DbgInfoStack_t *)DebugAlloc( sizeof(DbgInfoStack_t) * DBG_INFO_STACK_DEPTH );
g_nDbgInfoStackDepth = -1;
Expand All @@ -935,7 +935,7 @@ void CDbgMemAlloc::SaveDebugInfo( void *pvDebugInfo )

void CDbgMemAlloc::RestoreDebugInfo( const void *pvDebugInfo )
{
if ( g_DbgInfoStack == (void*)NULL )
if ( g_DbgInfoStack == (int)NULL )
{
g_DbgInfoStack = (DbgInfoStack_t *)DebugAlloc( sizeof(DbgInfoStack_t) * DBG_INFO_STACK_DEPTH );
g_nDbgInfoStackDepth = -1;
Expand Down Expand Up @@ -976,7 +976,7 @@ void CDbgMemAlloc::GetActualDbgInfo( const char *&pFileName, int &nLine )
return;
#endif

if ( g_DbgInfoStack == (void*)NULL )
if ( g_DbgInfoStack == (int)NULL )
{
g_DbgInfoStack = (DbgInfoStack_t *)DebugAlloc( sizeof(DbgInfoStack_t) * DBG_INFO_STACK_DEPTH );
g_nDbgInfoStackDepth = -1;
Expand Down

0 comments on commit 062596c

Please sign in to comment.