BAN: Add comparison operators for RefPtr
This commit is contained in:
parent
8bc6c2eb20
commit
30592b27ce
|
@ -124,6 +124,9 @@ namespace BAN
|
||||||
T* operator->() { return ptr(); }
|
T* operator->() { return ptr(); }
|
||||||
const T* operator->() const { return ptr(); }
|
const T* operator->() const { return ptr(); }
|
||||||
|
|
||||||
|
bool operator==(RefPtr other) const { return m_pointer == other.m_pointer; }
|
||||||
|
bool operator!=(RefPtr other) const { return m_pointer != other.m_pointer; }
|
||||||
|
|
||||||
bool empty() const { return m_pointer == nullptr; }
|
bool empty() const { return m_pointer == nullptr; }
|
||||||
operator bool() const { return m_pointer; }
|
operator bool() const { return m_pointer; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue