mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
AK: Allow comparing ValueComparingRefPtr with nullptr
This commit is contained in:
Notes:
github-actions[bot]
2026-02-20 22:04:27 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/50a9a8bfcb7 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8034 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -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==;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user