1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-03-29 07:27:13 +01:00

Implicit conversion to boolean of smart Sqrat pointers so they can be used in conditional expressions.

This commit is contained in:
Sandu Liviu Catalin 2016-06-08 16:57:48 +03:00
parent bc1e7dbde6
commit cf00eaa1b4

View File

@ -763,6 +763,15 @@ public:
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Checks if there is an associated managed object
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool operator bool () const
{
return m_Ptr != NULL;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Checks if there is NOT an associated managed object
///