mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
AK: Let's call decrementing reference counts "unref" instead of "deref"
It always bothered me that we're using the overloaded "dereference" term for this. Let's call it "unreference" instead. :^)
This commit is contained in:
parent
4aa1b5b40e
commit
3de5439579
12 changed files with 24 additions and 24 deletions
|
@ -46,10 +46,10 @@ inline void ref_if_not_null(T* ptr)
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
inline void deref_if_not_null(T* ptr)
|
||||
inline void unref_if_not_null(T* ptr)
|
||||
{
|
||||
if (ptr)
|
||||
ptr->deref();
|
||||
ptr->unref();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
@ -103,7 +103,7 @@ public:
|
|||
}
|
||||
~NonnullRefPtr()
|
||||
{
|
||||
deref_if_not_null(m_ptr);
|
||||
unref_if_not_null(m_ptr);
|
||||
m_ptr = nullptr;
|
||||
#ifdef SANITIZE_PTRS
|
||||
if constexpr (sizeof(T*) == 8)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue