Fix few clang20 errors

This commit is contained in:
GAMMACASE 2025-12-06 12:03:41 +03:00
parent c813329912
commit 9b5d730898
3 changed files with 16 additions and 6 deletions

View File

@ -434,7 +434,7 @@ typedef CBitVec<32> CDWordBitVec;
inline CVarBitVecBase::CVarBitVecBase()
{
Plat_FastMemset( this, 0, sizeof( *this ) );
Plat_FastMemset( (void *)this, 0, sizeof( *this ) );
}
//-----------------------------------------------------------------------------
@ -463,7 +463,7 @@ inline CVarBitVecBase::CVarBitVecBase( const CVarBitVecBase &from )
memcpy( m_pInt, from.m_pInt, m_numInts * sizeof(int) );
}
else
memset( this, 0, sizeof( *this ) );
memset( (void *)this, 0, sizeof( *this ) );
}
//-----------------------------------------------------------------------------
@ -527,7 +527,7 @@ inline bool CVarBitVecBase::Detach( uint32 **ppBits, int *pNumBits )
free( m_pInt );
}
memset( this, 0, sizeof( *this ) );
memset( (void *)this, 0, sizeof( *this ) );
return true;
}

View File

@ -602,7 +602,7 @@ public:
Destroy();
}
private:
protected:
void Create( const char *pName, const ConCommandCallbackInfo_t &cb, const char *pHelpString, uint64 flags, const CompletionCallbackInfo_t &completion_cb );
void Destroy( );
};

View File

@ -139,8 +139,18 @@ void CUtlBlockMemory<T,I>::Swap( CUtlBlockMemory< T, I > &mem )
{
V_swap( m_pMemory, mem.m_pMemory );
V_swap( m_nBlocks, mem.m_nBlocks );
V_swap( m_nIndexMask, mem.m_nIndexMask );
V_swap( m_nIndexShift, mem.m_nIndexShift );
{
int temp = mem.m_nIndexMask;
m_nIndexMask = mem.m_nIndexMask;
mem.m_nIndexMask = temp;
}
{
int temp = mem.m_nIndexShift;
m_nIndexShift = mem.m_nIndexShift;
mem.m_nIndexShift = temp;
}
}