mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 18:15:58 +00:00
AK: Add comparison operators to NonnullRefPtr
This commit is contained in:
parent
61a703816c
commit
ce7d868d6b
|
@ -218,6 +218,12 @@ public:
|
|||
AK::swap(m_ptr, other.m_ptr);
|
||||
}
|
||||
|
||||
bool operator==(NonnullRefPtr const& other) const { return m_ptr == other.m_ptr; }
|
||||
bool operator!=(NonnullRefPtr const& other) const { return m_ptr != other.m_ptr; }
|
||||
|
||||
bool operator==(NonnullRefPtr& other) { return m_ptr == other.m_ptr; }
|
||||
bool operator!=(NonnullRefPtr& other) { return m_ptr != other.m_ptr; }
|
||||
|
||||
// clang-format off
|
||||
private:
|
||||
NonnullRefPtr() = delete;
|
||||
|
|
Loading…
Reference in a new issue