diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2025-08-18 17:42:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-18 16:42:19 +0100 |
| commit | 1a0ed00f74f7cfcc3b7c4fd7e3bf0073c4973267 (patch) | |
| tree | 7fd960db0834b45c9a8b406cd34b49d99b2b627a /src/protocols/core/Compositor.hpp | |
| parent | 21953ddf3d74b8eb0670a1d293175379e786d13c (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.hpp')
| -rw-r--r-- | src/protocols/core/Compositor.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/protocols/core/Compositor.hpp b/src/protocols/core/Compositor.hpp index fd91d8d9..5a69deb6 100644 --- a/src/protocols/core/Compositor.hpp +++ b/src/protocols/core/Compositor.hpp @@ -35,13 +35,13 @@ class CContentType; class CWLCallbackResource { public: - CWLCallbackResource(SP<CWlCallback> resource_); + CWLCallbackResource(UP<CWlCallback>&& resource_); bool good(); void send(const Time::steady_tp& now); private: - SP<CWlCallback> m_resource; + UP<CWlCallback> m_resource; }; class CWLRegionResource { @@ -95,7 +95,7 @@ class CWLSurfaceResource { SSurfaceState m_pending; std::queue<UP<SSurfaceState>> m_pendingStates; - std::vector<SP<CWLCallbackResource>> m_callbacks; + std::vector<UP<CWLCallbackResource>> m_callbacks; WP<CWLSurfaceResource> m_self; WP<CWLSurface> m_hlSurface; std::vector<PHLMONITORREF> m_enteredOutputs; |
