diff --git a/public/datamodel/dmattributevar.h b/public/datamodel/dmattributevar.h index e0ce32f5f..b5f26c9a0 100644 --- a/public/datamodel/dmattributevar.h +++ b/public/datamodel/dmattributevar.h @@ -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 CDmaElement &operator=( S* pElement ) { @@ -1136,6 +1139,12 @@ inline void CDmaElement::InitAndCreate( CDmElement *pOwner, const char *pAttr m_pAttribute->AddFlag( flags | FATTRIB_MUSTCOPY ); } +template +inline const DmElementHandle_t& CDmaElement::Data() const +{ + return Value(); +} + template inline void CDmaElement::Init( CDmElement *pOwner, const char *pAttributeName, int flags ) { diff --git a/public/tier1/utlblockmemory.h b/public/tier1/utlblockmemory.h index 35ef2da2e..aa1ae034e 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 ); }