diff --git a/AK/NonnullOwnPtr.h b/AK/NonnullOwnPtr.h index b10ac3ddc7c..178cdccaa69 100644 --- a/AK/NonnullOwnPtr.h +++ b/AK/NonnullOwnPtr.h @@ -135,6 +135,12 @@ public: return NonnullOwnPtr(NonnullOwnPtr::Adopt, static_cast(*leak_ptr())); } + bool operator==(NonnullOwnPtr const& other) const { return m_ptr == other.m_ptr; } + bool operator!=(NonnullOwnPtr const& other) const { return m_ptr != other.m_ptr; } + + bool operator==(NonnullOwnPtr& other) { return m_ptr == other.m_ptr; } + bool operator!=(NonnullOwnPtr& other) { return m_ptr != other.m_ptr; } + private: void clear() {