Fix compilation on macOS ARM64 with modern Clang

This commit is contained in:
Atakan Argın 2025-11-23 20:55:21 +03:00
parent 29985681a1
commit 3c46da1d04
2 changed files with 6 additions and 6 deletions

View File

@ -1152,7 +1152,7 @@ inline void CDmaElement<T>::Init( CDmElement *pOwner, const char *pAttributeName
template <class T>
inline UtlSymId_t CDmaElement<T>::GetElementType() const
{
return this->Data().m_ElementType;
return this->m_pAttribute ? this->m_pAttribute->GetElementTypeSymbol() : UTL_INVAL_SYMBOL;
}
template <class T>
@ -1350,7 +1350,7 @@ inline int CDmaStringArrayBase<B>::InsertBefore( int elem, const char *pValue )
template< class E, class B >
inline UtlSymId_t CDmaElementArrayConstBase<E,B>::GetElementType() const
{
return this->Data().m_ElementType;
return this->m_pAttribute ? this->m_pAttribute->GetElementTypeSymbol() : UTL_INVAL_SYMBOL;
}
template< class E, class B >

View File

@ -137,10 +137,10 @@ CUtlBlockMemory<T,I>::~CUtlBlockMemory()
template< class T, class I >
void CUtlBlockMemory<T,I>::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 );
}