1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2026-10-10 20:03:08 +08:00

Extend CHandle::operator= overload (#412)

This commit is contained in:
Michal
2026-09-14 14:47:00 +02:00
committed by GitHub
parent d53b5f9455
commit cbb4b5bb25
+8
View File
@@ -71,6 +71,7 @@ public:
bool operator==( T *val ) const;
bool operator!=( T *val ) const;
const CBaseHandle& operator=( const T *val );
const CBaseHandle& operator=( const CBaseHandle &val );
T* operator->() const;
};
@@ -168,6 +169,13 @@ inline const CBaseHandle& CHandle<T>::operator=( const T *val )
return *this;
}
template<class T>
inline const CBaseHandle &CHandle<T>::operator=( const CBaseHandle &val )
{
Init( val.GetEntryIndex(), val.GetSerialNumber() );
return *this;
}
template<class T>
T* CHandle<T>::operator -> () const
{