BAN: Add comparison operators for RefPtr

This commit is contained in:
Bananymous 2024-05-29 13:50:03 +03:00
parent 8bc6c2eb20
commit 30592b27ce
1 changed files with 3 additions and 0 deletions
BAN/include/BAN

View File

@ -124,6 +124,9 @@ namespace BAN
T* operator->() { 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; }
operator bool() const { return m_pointer; }