From 3bb772f7c0652cd78089522ac58235b9b34f71d6 Mon Sep 17 00:00:00 2001 From: GAMMACASE <31375974+GAMMACASE@users.noreply.github.com> Date: Sat, 6 Dec 2025 15:58:45 +0300 Subject: [PATCH] Fix other clang20 errors/warnings --- public/tier1/utlmemory.h | 2 +- public/tier1/utlrbtree.h | 2 +- public/tier1/utlvector.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/tier1/utlmemory.h b/public/tier1/utlmemory.h index f37f08a6..9ce634d3 100644 --- a/public/tier1/utlmemory.h +++ b/public/tier1/utlmemory.h @@ -465,7 +465,7 @@ void CUtlMemory::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 diff --git a/public/tier1/utlrbtree.h b/public/tier1/utlrbtree.h index 0b1c7324..32a340f2 100644 --- a/public/tier1/utlrbtree.h +++ b/public/tier1/utlrbtree.h @@ -448,7 +448,7 @@ inline void CUtlRBTree::CopyFrom( const CUtlRBTree &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; diff --git a/public/tier1/utlvector.h b/public/tier1/utlvector.h index 0640eeb0..7b2802fc 100644 --- a/public/tier1/utlvector.h +++ b/public/tier1/utlvector.h @@ -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::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; } }