mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-12-06 18:18:23 +00:00
Fix other clang20 errors/warnings
This commit is contained in:
parent
9b5d730898
commit
3bb772f7c0
@ -465,7 +465,7 @@ void CUtlMemory<T,I>::ConvertToGrowableMemory( int nGrowSize )
|
|||||||
|
|
||||||
int nNumBytes = m_nAllocationCount * sizeof(T);
|
int nNumBytes = m_nAllocationCount * sizeof(T);
|
||||||
T *pMemory = (T*)malloc( nNumBytes );
|
T *pMemory = (T*)malloc( nNumBytes );
|
||||||
memcpy( pMemory, m_pMemory, nNumBytes );
|
memcpy( (void*)pMemory, (void *)m_pMemory, nNumBytes );
|
||||||
m_pMemory = pMemory;
|
m_pMemory = pMemory;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -448,7 +448,7 @@ inline void CUtlRBTree<T, I, L, M>::CopyFrom( const CUtlRBTree<T, I, L, M> &othe
|
|||||||
{
|
{
|
||||||
Purge();
|
Purge();
|
||||||
m_Elements.EnsureCapacity( other.m_Elements.Count() );
|
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_LessFunc = other.m_LessFunc;
|
||||||
m_Root = other.m_Root;
|
m_Root = other.m_Root;
|
||||||
m_NumElements = other.m_NumElements;
|
m_NumElements = other.m_NumElements;
|
||||||
|
|||||||
@ -419,7 +419,7 @@ public:
|
|||||||
if (Count() > 0)
|
if (Count() > 0)
|
||||||
{
|
{
|
||||||
if ( elem != m_pData->m_Size -1 )
|
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;
|
--m_pData->m_Size;
|
||||||
}
|
}
|
||||||
if ( !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 (m_Size > 0)
|
||||||
{
|
{
|
||||||
if ( elem != m_Size -1 )
|
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;
|
--m_Size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user