Fix other clang20 errors/warnings

This commit is contained in:
GAMMACASE 2025-12-06 15:58:45 +03:00
parent 9b5d730898
commit 3bb772f7c0
3 changed files with 4 additions and 4 deletions

View File

@ -465,7 +465,7 @@ void CUtlMemory<T,I>::ConvertToGrowableMemory( int nGrowSize )
int nNumBytes = m_nAllocationCount * sizeof(T);
T *pMemory = (T*)malloc( nNumBytes );
memcpy( pMemory, m_pMemory, nNumBytes );
memcpy( (void*)pMemory, (void *)m_pMemory, nNumBytes );
m_pMemory = pMemory;
}
else

View File

@ -448,7 +448,7 @@ inline void CUtlRBTree<T, I, L, M>::CopyFrom( const CUtlRBTree<T, I, L, M> &othe
{
Purge();
m_Elements.EnsureCapacity( other.m_Elements.Count() );
memcpy( m_Elements.Base(), other.m_Elements.Base(), other.m_Elements.Count() * sizeof( UtlRBTreeNode_t< T, I > ) );
memcpy( (void *)m_Elements.Base(), (void *)other.m_Elements.Base(), other.m_Elements.Count() * sizeof( UtlRBTreeNode_t< T, I > ) );
m_LessFunc = other.m_LessFunc;
m_Root = other.m_Root;
m_NumElements = other.m_NumElements;

View File

@ -419,7 +419,7 @@ public:
if (Count() > 0)
{
if ( elem != m_pData->m_Size -1 )
memcpy( &Element(elem), &Element(m_pData->m_Size-1), sizeof(T) );
memcpy( (void *)&Element(elem), (void *)&Element(m_pData->m_Size-1), sizeof(T) );
--m_pData->m_Size;
}
if ( !m_pData->m_Size )
@ -1065,7 +1065,7 @@ void CUtlVector<T, A>::FastRemove( int elem )
if (m_Size > 0)
{
if ( elem != m_Size -1 )
memcpy( &Element(elem), &Element(m_Size-1), sizeof(T) );
memcpy( (void *)&Element(elem), (void *)&Element(m_Size-1), sizeof(T) );
--m_Size;
}
}