From 3c46da1d040be914240550c0df39489ec26bee81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atakan=20Arg=C4=B1n?= Date: Sun, 23 Nov 2025 20:55:21 +0300 Subject: [PATCH] Fix compilation on macOS ARM64 with modern Clang --- public/datamodel/dmattributevar.h | 4 ++-- public/tier1/utlblockmemory.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/datamodel/dmattributevar.h b/public/datamodel/dmattributevar.h index e0ce32f5..19fd8e83 100644 --- a/public/datamodel/dmattributevar.h +++ b/public/datamodel/dmattributevar.h @@ -1152,7 +1152,7 @@ inline void CDmaElement::Init( CDmElement *pOwner, const char *pAttributeName template inline UtlSymId_t CDmaElement::GetElementType() const { - return this->Data().m_ElementType; + return this->m_pAttribute ? this->m_pAttribute->GetElementTypeSymbol() : UTL_INVAL_SYMBOL; } template @@ -1350,7 +1350,7 @@ inline int CDmaStringArrayBase::InsertBefore( int elem, const char *pValue ) template< class E, class B > inline UtlSymId_t CDmaElementArrayConstBase::GetElementType() const { - return this->Data().m_ElementType; + return this->m_pAttribute ? this->m_pAttribute->GetElementTypeSymbol() : UTL_INVAL_SYMBOL; } template< class E, class B > diff --git a/public/tier1/utlblockmemory.h b/public/tier1/utlblockmemory.h index 35ef2da2..aa1ae034 100644 --- a/public/tier1/utlblockmemory.h +++ b/public/tier1/utlblockmemory.h @@ -137,10 +137,10 @@ CUtlBlockMemory::~CUtlBlockMemory() template< class T, class I > void CUtlBlockMemory::Swap( CUtlBlockMemory< T, I > &mem ) { - this->swap( m_pMemory, mem.m_pMemory ); - this->swap( m_nBlocks, mem.m_nBlocks ); - this->swap( m_nIndexMask, mem.m_nIndexMask ); - this->swap( m_nIndexShift, mem.m_nIndexShift ); + std::swap( m_pMemory, mem.m_pMemory ); + std::swap( m_nBlocks, mem.m_nBlocks ); + std::swap( m_nIndexMask, mem.m_nIndexMask ); + std::swap( m_nIndexShift, mem.m_nIndexShift ); }