From 3a624ee65b1ba9c59bdcbf91f1a8a9be90b62b87 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 25 Feb 2026 09:15:59 -0500 Subject: [PATCH] Rename ref_count to rcp_ref_count --- include/rcp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/rcp.h b/include/rcp.h index f46b27b..5912a2a 100644 --- a/include/rcp.h +++ b/include/rcp.h @@ -276,21 +276,21 @@ rcp rcp_dynamic_cast(rcp && other) #define rcp_managed_root(classname) \ private: \ - mutable std::atomic ref_count{0}; \ + mutable std::atomic rcp_ref_count{0}; \ void rcp_inc() const \ { \ - ref_count.fetch_add(1, std::memory_order_relaxed); \ + rcp_ref_count.fetch_add(1, std::memory_order_relaxed); \ } \ void rcp_dec() const \ { \ - if (ref_count.fetch_sub(1, std::memory_order_acq_rel) == 1) \ + if (rcp_ref_count.fetch_sub(1, std::memory_order_acq_rel) == 1) \ { \ delete this; \ } \ } \ int rcp_count() const \ { \ - return ref_count.load(std::memory_order_relaxed); \ + return rcp_ref_count.load(std::memory_order_relaxed); \ } \ template friend class rcp; \ rcp_managed(classname)