Remove get_root_rcp()

This commit is contained in:
Josh Holtrop 2026-02-23 21:55:26 -05:00
parent b45e664726
commit 71b4bf14a0

View File

@ -100,9 +100,9 @@ class root
private:
mutable std::atomic<int> ref_count{0};
protected:
mutable rcp<root> root_rcp;
protected:
root()
{
root_rcp.init_ptr(this);
@ -124,18 +124,12 @@ public:
delete this;
}
}
rcp<root> & get_root_rcp()
{
return root_rcp;
}
};
#define rcp_managed(classname) \
rcp<classname> get_rcp() \
{ \
root * r = (root *)this; \
return rcp<classname>(r->get_root_rcp()); \
return rcp<classname>(root_rcp); \
} \
template <typename... Args> \
static rcp<classname> create(Args&&... args) \