Skip to content
Open
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
8 changes: 4 additions & 4 deletions src/public/vscript/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ class CVariantBase
operator char() const { Assert( m_type == FIELD_CHARACTER ); return m_char; }
operator bool() const { Assert( m_type == FIELD_BOOLEAN ); return m_bool; }
operator HSCRIPT() const { Assert( m_type == FIELD_HSCRIPT ); return m_hScript; }
operator CBaseHandle() const { Assert( m_type == FIELD_EHANDLE ); return CBaseHandle( m_hEntity ); }
operator CBaseEntity*() const { Assert( m_type == FIELD_EHANDLE ); return CHandle<CBaseEntity>(CBaseHandle( m_hEntity )); }
operator CBaseHandle() const { Assert( m_type == FIELD_EHANDLE ); return CBaseHandle::UnsafeFromIndex( m_hEntity ); }
operator CBaseEntity*() const { Assert( m_type == FIELD_EHANDLE ); return CHandle<CBaseEntity>::UnsafeFromIndex( m_hEntity ); }
operator const Quaternion &() const { Assert( m_type == FIELD_QUATERNION ); return m_pData ? *(Quaternion*)m_pData : quat_identity; }
// operator CUtlStringToken() const { Assert( m_type == FIELD_UTLSTRINGTOKEN ); CUtlStringToken t; t.m_nHashCode = m_utlStringToken; return t; }

Expand Down Expand Up @@ -614,7 +614,7 @@ inline bool CVariantBase<CValueAllocator>::AssignTo( CBaseHandle *pDest ) const
{
switch( m_type )
{
case FIELD_EHANDLE: *pDest = CHandle< CBaseEntity >(m_hEntity); return true;
case FIELD_EHANDLE: *pDest = CHandle< CBaseEntity >::UnsafeFromIndex( m_hEntity ); return true;
default:
Warning( "No free conversion of %s variant to EHANDLE right now\n", VariantFieldTypeName( m_type ) );
break;
Expand All @@ -627,7 +627,7 @@ inline bool CVariantBase<CValueAllocator>::AssignTo( CBaseEntity **pDest ) const
{
switch( m_type )
{
case FIELD_EHANDLE: *pDest = CHandle< CBaseEntity >(m_hEntity); return true;
case FIELD_EHANDLE: *pDest = CHandle< CBaseEntity >::UnsafeFromIndex( m_hEntity ); return true;
default:
Warning( "No free conversion of %s variant to CBaseEntity * right now\n", VariantFieldTypeName( m_type ) );
break;
Expand Down