From 45bb355c0075686c00d9dfd176f2b93e2d8199c9 Mon Sep 17 00:00:00 2001 From: Shivam Kunwar Date: Wed, 21 Feb 2024 14:21:17 +0530 Subject: [PATCH] make ConnectionHandle::create a private method --- src/kdbindings/connection_handle.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/kdbindings/connection_handle.h b/src/kdbindings/connection_handle.h index 3a81dd4..128b2dd 100644 --- a/src/kdbindings/connection_handle.h +++ b/src/kdbindings/connection_handle.h @@ -177,13 +177,6 @@ class ConnectionHandle return false; } - // Factory method to create a ConnectionHandle - static std::shared_ptr create(const std::weak_ptr& signalImpl, std::optional id) { - auto handle = std::shared_ptr(new ConnectionHandle(signalImpl, id)); - handle->self = handle; // Keep a weak reference to self - return handle; - } - private: template friend class Signal; @@ -215,6 +208,14 @@ class ConnectionHandle } return nullptr; } + + // Factory method to create a ConnectionHandle + static std::shared_ptr create(const std::weak_ptr &signalImpl, std::optional id) + { + auto handle = std::shared_ptr(new ConnectionHandle(signalImpl, id)); + handle->self = handle; // Keep a weak reference to self + return handle; + } }; /**