diff options
Diffstat (limited to 'zencore')
| -rw-r--r-- | zencore/include/zencore/refcount.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/zencore/include/zencore/refcount.h b/zencore/include/zencore/refcount.h index de7d315f4..e6cdbc540 100644 --- a/zencore/include/zencore/refcount.h +++ b/zencore/include/zencore/refcount.h @@ -58,9 +58,10 @@ public: inline RefPtr(T* Ptr) : m_Ref(Ptr) { m_Ref && m_Ref->AddRef(); } inline ~RefPtr() { m_Ref && m_Ref->Release(); } - inline explicit operator bool() const { return m_Ref != nullptr; } - inline operator T*() const { return m_Ref; } - inline T* operator->() const { return m_Ref; } + [[nodiscard]] inline bool IsNull() const { return m_Ref == nullptr; } + inline explicit operator bool() const { return m_Ref != nullptr; } + inline operator T*() const { return m_Ref; } + inline T* operator->() const { return m_Ref; } inline std::strong_ordering operator<=>(const RefPtr& Rhs) const = default; |