From cbb4b5bb25cdf66c986dc3d2985cdcaa97fcb9b2 Mon Sep 17 00:00:00 2001 From: Michal <88426022+SlynxCZ@users.noreply.github.com> Date: Mon, 14 Sep 2026 14:47:00 +0200 Subject: [PATCH] Extend CHandle::operator= overload (#412) --- game/shared/ehandle.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/game/shared/ehandle.h b/game/shared/ehandle.h index 26c2055c..7c8375dc 100644 --- a/game/shared/ehandle.h +++ b/game/shared/ehandle.h @@ -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::operator=( const T *val ) return *this; } +template +inline const CBaseHandle &CHandle::operator=( const CBaseHandle &val ) +{ + Init( val.GetEntryIndex(), val.GetSerialNumber() ); + return *this; +} + template T* CHandle::operator -> () const {