mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
AK: Always inline the RefCountedBase functions
This commit is contained in:
parent
2495460f6e
commit
77f72c7cfe
Notes:
sideshowbarker
2024-07-18 02:55:30 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/77f72c7cfeb
1 changed files with 2 additions and 2 deletions
|
@ -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<RefCountType>::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;
|
||||
|
|
Loading…
Add table
Reference in a new issue