From a21882be33f3debe27e327c6b125e17ad438f90e Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Thu, 10 Jul 2025 12:49:24 +0200 Subject: ctmcontrol: move to unique ptrs less refcounting, move by rvalue. --- src/protocols/CTMControl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/protocols/CTMControl.cpp') diff --git a/src/protocols/CTMControl.cpp b/src/protocols/CTMControl.cpp index 315941d3..c9e9d098 100644 --- a/src/protocols/CTMControl.cpp +++ b/src/protocols/CTMControl.cpp @@ -8,7 +8,7 @@ #include "../helpers/Monitor.hpp" #include "../helpers/MiscFunctions.hpp" -CHyprlandCTMControlResource::CHyprlandCTMControlResource(SP resource_) : m_resource(resource_) { +CHyprlandCTMControlResource::CHyprlandCTMControlResource(UP&& resource_) : m_resource(std::move(resource_)) { if UNLIKELY (!good()) return; @@ -87,7 +87,7 @@ CHyprlandCTMControlProtocol::CHyprlandCTMControlProtocol(const wl_interface* ifa } void CHyprlandCTMControlProtocol::bindManager(wl_client* client, void* data, uint32_t ver, uint32_t id) { - const auto RESOURCE = m_managers.emplace_back(makeShared(makeShared(client, ver, id))); + const auto& RESOURCE = m_managers.emplace_back(makeUnique(makeUnique(client, ver, id))); if UNLIKELY (!RESOURCE->good()) { wl_client_post_no_memory(client); -- cgit v1.2.3