summaryrefslogtreecommitdiff
path: root/src/protocols/core/Compositor.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-08-18 17:42:19 +0200
committerGitHub <noreply@github.com>2025-08-18 16:42:19 +0100
commit1a0ed00f74f7cfcc3b7c4fd7e3bf0073c4973267 (patch)
tree7fd960db0834b45c9a8b406cd34b49d99b2b627a /src/protocols/core/Compositor.cpp
parent21953ddf3d74b8eb0670a1d293175379e786d13c (diff)
protocols/wayland: use UP and rvalue refs for callbacks (#11471)
use UP and rvalue refs in CWLCallbackResource and m_callbacks.
Diffstat (limited to 'src/protocols/core/Compositor.cpp')
-rw-r--r--src/protocols/core/Compositor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/protocols/core/Compositor.cpp b/src/protocols/core/Compositor.cpp
index 37e2df9a..73326990 100644
--- a/src/protocols/core/Compositor.cpp
+++ b/src/protocols/core/Compositor.cpp
@@ -27,7 +27,7 @@ class CDefaultSurfaceRole : public ISurfaceRole {
}
};
-CWLCallbackResource::CWLCallbackResource(SP<CWlCallback> resource_) : m_resource(resource_) {
+CWLCallbackResource::CWLCallbackResource(UP<CWlCallback>&& resource_) : m_resource(std::move(resource_)) {
;
}
@@ -239,7 +239,7 @@ CWLSurfaceResource::CWLSurfaceResource(SP<CWlSurface> resource_) : m_resource(re
m_pending.opaque = RG->m_region;
});
- m_resource->setFrame([this](CWlSurface* r, uint32_t id) { m_callbacks.emplace_back(makeShared<CWLCallbackResource>(makeShared<CWlCallback>(m_client, 1, id))); });
+ m_resource->setFrame([this](CWlSurface* r, uint32_t id) { m_callbacks.emplace_back(makeUnique<CWLCallbackResource>(makeUnique<CWlCallback>(m_client, 1, id))); });
m_resource->setOffset([this](CWlSurface* r, int32_t x, int32_t y) {
m_pending.updated.bits.offset = true;