diff --git a/public/bitvec.h b/public/bitvec.h index 2b30dd39..830fa9eb 100644 --- a/public/bitvec.h +++ b/public/bitvec.h @@ -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; } diff --git a/public/tier1/convar.h b/public/tier1/convar.h index 8b3b00e0..19f80a9b 100644 --- a/public/tier1/convar.h +++ b/public/tier1/convar.h @@ -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( ); }; diff --git a/public/tier1/utlblockmemory.h b/public/tier1/utlblockmemory.h index b12fb379..10f05d41 100644 --- a/public/tier1/utlblockmemory.h +++ b/public/tier1/utlblockmemory.h @@ -139,8 +139,18 @@ void CUtlBlockMemory::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; + } }