summaryrefslogtreecommitdiff
path: root/AK/NonnullRefPtr.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-01-23 15:14:21 +0100
committerAndreas Kling <kling@serenityos.org>2020-01-23 15:14:21 +0100
commit3de5439579c58d833b3e23768ed2ecb4a16e9d3c (patch)
tree2a333abfbbdec5a76a0088446bd5e6a7426b7488 /AK/NonnullRefPtr.h
parent4aa1b5b40e14b6173d576fa22563ebd393561296 (diff)
downloadserenity-3de5439579c58d833b3e23768ed2ecb4a16e9d3c.zip
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. :^)
Diffstat (limited to 'AK/NonnullRefPtr.h')
-rw-r--r--AK/NonnullRefPtr.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/AK/NonnullRefPtr.h b/AK/NonnullRefPtr.h
index a30a3c96bc..426c4f5dca 100644
--- a/AK/NonnullRefPtr.h
+++ b/AK/NonnullRefPtr.h
@@ -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)