mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-02-22 04:37:13 +01:00
Implement implicit or explicit conversions to boolean for Sqrat weak pointers.
This commit is contained in:
parent
7f50156664
commit
e93319a381
@ -1325,6 +1325,24 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// Checks if there is an associated managed object
|
||||||
|
///
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
operator bool () const
|
||||||
|
{
|
||||||
|
return m_Ptr != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// Checks if there is NOT an associated managed object
|
||||||
|
///
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
bool operator!() const
|
||||||
|
{
|
||||||
|
return m_Ptr == NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/// Checks whether the managed object exists
|
/// Checks whether the managed object exists
|
||||||
///
|
///
|
||||||
|
Loading…
x
Reference in New Issue
Block a user