mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-03-29 08:40:40 +00:00
Fix: Port to macOS 15.5 (Sequoia) – clang++ compatibility, std::swap, Data() templating
This commit is contained in:
parent
29985681a1
commit
59bd2a104c
@ -105,6 +105,9 @@ public:
|
||||
// NULL check
|
||||
bool operator!() const;
|
||||
|
||||
// Returns the underlying DmElementHandle_t data
|
||||
const DmElementHandle_t& Data() const;
|
||||
|
||||
// Assignment.. wish I knew how to un-inline these methods
|
||||
template <class S> CDmaElement<T> &operator=( S* pElement )
|
||||
{
|
||||
@ -1136,6 +1139,12 @@ inline void CDmaElement<T>::InitAndCreate( CDmElement *pOwner, const char *pAttr
|
||||
m_pAttribute->AddFlag( flags | FATTRIB_MUSTCOPY );
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline const DmElementHandle_t& CDmaElement<T>::Data() const
|
||||
{
|
||||
return Value();
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void CDmaElement<T>::Init( CDmElement *pOwner, const char *pAttributeName, int flags )
|
||||
{
|
||||
|
||||
@ -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 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user