diff --git a/AK/NonnullOwnPtr.h b/AK/NonnullOwnPtr.h index b10ac3ddc7c2a4ddd73330afc4a19d7744ce0c78..178cdccaa69bbd17fbdad018b77f71a71bebece0 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() {