Skip to content

Fix: Port to macOS 15.5 (Sequoia) – clang++ compatibility, std::swap,… #433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions public/datamodel/dmattributevar.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ class CDmaElement : public CDmaVar< DmElementHandle_t >
// 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 )
{
Expand Down Expand Up @@ -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 )
{
Expand Down
8 changes: 4 additions & 4 deletions public/tier1/utlblockmemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}


Expand Down