mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-15 22:57:12 +02:00
Adjust the smart pointers in the Sqrat library.
Do not overwrite command listener options inc constructor. Few other minor changes.
This commit is contained in:
@ -886,7 +886,7 @@ public:
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
operator bool () const
|
||||
{
|
||||
return m_Ptr != NULL;
|
||||
return m_Ptr;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -895,7 +895,7 @@ public:
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
bool operator!() const
|
||||
{
|
||||
return m_Ptr == NULL;
|
||||
return !m_Ptr;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -1044,7 +1044,7 @@ public:
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// Gets the number of referencesd to the underlying pointer
|
||||
/// Gets the number of references to the underlying pointer
|
||||
///
|
||||
/// \return Number of references
|
||||
///
|
||||
@ -1351,24 +1351,6 @@ public:
|
||||
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
|
||||
///
|
||||
@ -1422,6 +1404,17 @@ public:
|
||||
m_RefCountRefCount = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// Gets the number of weak references to the underlying pointer
|
||||
///
|
||||
/// \return Number of references
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
unsigned int Count() const
|
||||
{
|
||||
return m_RefCountRefCount ? *m_RefCountRefCount : 0;
|
||||
}
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user