summaryrefslogtreecommitdiff
path: root/AK/Weakable.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-04-23 16:46:57 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-23 16:46:57 +0200
commitb91c49364df1683c7fe1191eb02b8d9c331874f6 (patch)
treea9ea5ff8e4cc8cfcfe75c279551be35793d0ffb3 /AK/Weakable.h
parentb3db01e20eeae632cc75df9af8666772bda67091 (diff)
downloadserenity-b91c49364df1683c7fe1191eb02b8d9c331874f6.zip
AK: Rename adopt() to adopt_ref()
This makes it more symmetrical with adopt_own() (which is used to create a NonnullOwnPtr from the result of a naked new.)
Diffstat (limited to 'AK/Weakable.h')
-rw-r--r--AK/Weakable.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/AK/Weakable.h b/AK/Weakable.h
index 4b23f44f80..4ad2a516af 100644
--- a/AK/Weakable.h
+++ b/AK/Weakable.h
@@ -43,7 +43,7 @@ public:
if (!(m_consumers.fetch_add(1u << 1, AK::MemoryOrder::memory_order_acquire) & 1u)) {
T* ptr = (T*)m_ptr.load(AK::MemoryOrder::memory_order_acquire);
if (ptr && ptr->try_ref())
- ref = adopt(*ptr);
+ ref = adopt_ref(*ptr);
}
m_consumers.fetch_sub(1u << 1, AK::MemoryOrder::memory_order_release);
}