Fix few clang20 errors

This commit is contained in:
GAMMACASE committed 2026-03-20 17:56:28 +03:00
1 parent 059e3899af
commit e7bdd30936
3 files changed
+16 -6

No files matched your search

+3 -3
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;
}
+1 -1
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( );
};
+12 -2
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;
}
}