AK: Allow comparing ValueComparingRefPtr with nullptr
This commit is contained in:
parent
4f3303b12f
commit
50a9a8bfcb
1 changed files with 5 additions and 0 deletions
|
|
@ -58,6 +58,11 @@ struct ValueComparingRefPtr : public RefPtr<T> {
|
|||
return this->ptr() == other.ptr() || (this->ptr() && other.ptr() && this->ptr()->equals(*other));
|
||||
}
|
||||
|
||||
bool operator==(nullptr_t) const
|
||||
{
|
||||
return this->is_null();
|
||||
}
|
||||
|
||||
private:
|
||||
using RefPtr<T>::operator==;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue