Skip to content

Commit

Permalink
make ConnectionHandle::create a private method
Browse files Browse the repository at this point in the history
  • Loading branch information
phyBrackets authored and LeonMatthesKDAB committed Jul 3, 2024
1 parent 223ba2c commit 45bb355
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/kdbindings/connection_handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,6 @@ class ConnectionHandle
return false;
}

// Factory method to create a ConnectionHandle
static std::shared_ptr<ConnectionHandle> create(const std::weak_ptr<Private::SignalImplBase>& signalImpl, std::optional<Private::GenerationalIndex> id) {
auto handle = std::shared_ptr<ConnectionHandle>(new ConnectionHandle(signalImpl, id));
handle->self = handle; // Keep a weak reference to self
return handle;
}

private:
template<typename...>
friend class Signal;
Expand Down Expand Up @@ -215,6 +208,14 @@ class ConnectionHandle
}
return nullptr;
}

// Factory method to create a ConnectionHandle
static std::shared_ptr<ConnectionHandle> create(const std::weak_ptr<Private::SignalImplBase> &signalImpl, std::optional<Private::GenerationalIndex> id)
{
auto handle = std::shared_ptr<ConnectionHandle>(new ConnectionHandle(signalImpl, id));
handle->self = handle; // Keep a weak reference to self
return handle;
}
};

/**
Expand Down

0 comments on commit 45bb355

Please sign in to comment.