Skip to content

Commit

Permalink
Fix nontrivial memcall warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Wend4r committed Feb 2, 2025
1 parent 9c3548c commit 0b35c96
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/bitvec.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ typedef CBitVec<32> CDWordBitVec;
template <typename BITCOUNTTYPE>
inline CVarBitVecBase<BITCOUNTTYPE>::CVarBitVecBase()
{
Plat_FastMemset( this, 0, sizeof( *this ) );
Plat_FastMemset( (void *)this, 0, sizeof( *this ) );
}

//-----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion public/tier1/utlmemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ void CUtlMemory<T,I>::CopyFrom( const CUtlMemory& from )

if( m_pMemory )
{
memcpy( m_pMemory, from.m_pMemory, from.m_nAllocationCount * sizeof(T) );
memcpy( (void*)m_pMemory, (const void*)from.m_pMemory, from.m_nAllocationCount * sizeof(T) );
}
}

Expand Down
2 changes: 1 addition & 1 deletion public/tier1/utlvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ void CUtlVectorBase<T, I, A>::FastRemove( I elem )
if (m_Size > 0)
{
if ( elem != m_Size -1 )
memcpy( &Element(elem), &Element(m_Size-1), sizeof(T) );
memcpy( (void*)&Element(elem), (const void*)&Element(m_Size-1), sizeof(T) );
--m_Size;
}
}
Expand Down

0 comments on commit 0b35c96

Please sign in to comment.