AK: Allow comparing ValueComparingRefPtr with nullptr

This commit is contained in:
Callum Law
2026-02-17 22:54:22 +13:00
committed by Sam Atkins
parent 4f3303b12f
commit 50a9a8bfcb
Notes: github-actions[bot] 2026-02-20 22:04:27 +00:00

View File

@@ -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==;
};