From 77f72c7cfeba83994815cd6aee859ea6336cb130 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 8 Oct 2021 22:11:39 +0200 Subject: [PATCH] AK: Always inline the RefCountedBase functions --- AK/RefCounted.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AK/RefCounted.h b/AK/RefCounted.h index 3417333d1a..e954692b05 100644 --- a/AK/RefCounted.h +++ b/AK/RefCounted.h @@ -50,7 +50,7 @@ public: using RefCountType = unsigned int; using AllowOwnPtr = FalseType; - void ref() const + ALWAYS_INLINE void ref() const { VERIFY(m_ref_count > 0); VERIFY(!Checked::addition_would_overflow(m_ref_count, 1)); @@ -71,7 +71,7 @@ protected: RefCountedBase() = default; ~RefCountedBase() { VERIFY(!m_ref_count); } - RefCountType deref_base() const + ALWAYS_INLINE RefCountType deref_base() const { VERIFY(m_ref_count); return --m_ref_count;