Rename increment/decrement ref count APIs

This commit is contained in:
josh committed 2026-02-23 17:31:04 -05:00
1 parent c628177b94
commit 65c859030d
1 file changed
+6 -6
+6 -6
View File
@@ -20,12 +20,12 @@ namespace rcp_internal
virtual ~root() = default;
public:
void add_ref() const
void rcp_inc() const
{
ref_count.fetch_add(1, std::memory_order_relaxed);
}
void release_ref() const
void rcp_dec() const
{
if (ref_count.fetch_sub(1, std::memory_order_acq_rel) == 0)
{
@@ -67,7 +67,7 @@ private:
{
if (p)
{
ptr->add_ref();
ptr->rcp_inc();
}
}
@@ -80,7 +80,7 @@ public:
{
if (ptr)
{
ptr->add_ref();
ptr->rcp_inc();
}
}
@@ -88,7 +88,7 @@ public:
{
if (ptr)
{
ptr->release_ref();
ptr->rcp_dec();
}
}
@@ -98,7 +98,7 @@ public:
{
if (ptr)
{
ptr->add_ref();
ptr->rcp_inc();
}
}