1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00

AK: Demote VERIFY in NonnullRefPtr to ASSERT

NonnullRefPtr almost always has a non-null pointer internally, that's
what the class is for, after all! The one edge case where it has null
internally is after you move() it. But it's always a bug to use an
NNRP after moving from it, and we have clang-tidy yelling at us if
that ever happens.

Demoting this removes a gazillion overly paranoid null checks.
This commit is contained in:
Andreas Kling 2025-04-28 01:35:30 +02:00 committed by Tim Flynn
parent 074ca5d5b4
commit 580b892b9e
Notes: github-actions[bot] 2025-04-28 14:40:58 +00:00

View file

@ -212,7 +212,7 @@ private:
ALWAYS_INLINE RETURNS_NONNULL T* as_nonnull_ptr() const
{
VERIFY(m_ptr);
ASSERT(m_ptr);
return m_ptr;
}