mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
AK: Add comparison operators to NonnullOwnPtr
This commit is contained in:
@@ -135,6 +135,12 @@ public:
|
||||
return NonnullOwnPtr<U>(NonnullOwnPtr<U>::Adopt, static_cast<U&>(*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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user