From 71b4bf14a03d5fa3cdaba88759a6f43e9d539540 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 23 Feb 2026 21:55:26 -0500 Subject: [PATCH] Remove get_root_rcp() --- include/rcp.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/include/rcp.h b/include/rcp.h index bc79cf4..e3bab3b 100644 --- a/include/rcp.h +++ b/include/rcp.h @@ -100,9 +100,9 @@ class root private: mutable std::atomic ref_count{0}; +protected: mutable rcp root_rcp; -protected: root() { root_rcp.init_ptr(this); @@ -124,18 +124,12 @@ public: delete this; } } - - rcp & get_root_rcp() - { - return root_rcp; - } }; #define rcp_managed(classname) \ rcp get_rcp() \ { \ - root * r = (root *)this; \ - return rcp(r->get_root_rcp()); \ + return rcp(root_rcp); \ } \ template \ static rcp create(Args&&... args) \