From 65ca132a80760be9f4c0fe1a175445e867bb7ac8 Mon Sep 17 00:00:00 2001 From: reduz Date: Mon, 23 Aug 2021 20:57:52 -0300 Subject: Expose RID creation utilities. * Exposed as utility functions. * Not very useful for script, but vital for creating servers using native extensions. --- core/templates/rid_owner.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'core/templates/rid_owner.h') diff --git a/core/templates/rid_owner.h b/core/templates/rid_owner.h index 8d139551ef..e947d2211c 100644 --- a/core/templates/rid_owner.h +++ b/core/templates/rid_owner.h @@ -53,14 +53,16 @@ protected: return rid; } - static uint64_t _gen_id() { - return base_id.increment(); - } - static RID _gen_rid() { return _make_from_id(_gen_id()); } + friend struct VariantUtilityFunctions; + + static uint64_t _gen_id() { + return base_id.increment(); + } + public: virtual ~RID_AllocBase() {} }; -- cgit v1.2.3