summaryrefslogtreecommitdiff
path: root/src/protocols/SinglePixel.hpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-07-10 13:11:07 +0200
committerVaxry <43317083+vaxerski@users.noreply.github.com>2025-07-10 14:09:00 +0200
commitb5433bb75324a95dd27eb5492141565466c2cdd6 (patch)
tree0e67a1d504c5f18dc81ea93c90ebd58fb82770e1 /src/protocols/SinglePixel.hpp
parentbcb96c553214d0938289c0fc7d79de82629ccf18 (diff)
singlepixel: move to unique ptrs
less refcounting, move by rvalue.
Diffstat (limited to 'src/protocols/SinglePixel.hpp')
-rw-r--r--src/protocols/SinglePixel.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/protocols/SinglePixel.hpp b/src/protocols/SinglePixel.hpp
index 4f613de8..f8bbfba9 100644
--- a/src/protocols/SinglePixel.hpp
+++ b/src/protocols/SinglePixel.hpp
@@ -43,12 +43,12 @@ class CSinglePixelBufferResource {
class CSinglePixelBufferManagerResource {
public:
- CSinglePixelBufferManagerResource(SP<CWpSinglePixelBufferManagerV1> resource_);
+ CSinglePixelBufferManagerResource(UP<CWpSinglePixelBufferManagerV1>&& resource_);
bool good();
private:
- SP<CWpSinglePixelBufferManagerV1> m_resource;
+ UP<CWpSinglePixelBufferManagerV1> m_resource;
};
class CSinglePixelProtocol : public IWaylandProtocol {
@@ -62,8 +62,8 @@ class CSinglePixelProtocol : public IWaylandProtocol {
void destroyResource(CSinglePixelBufferResource* resource);
//
- std::vector<SP<CSinglePixelBufferManagerResource>> m_managers;
- std::vector<SP<CSinglePixelBufferResource>> m_buffers;
+ std::vector<UP<CSinglePixelBufferManagerResource>> m_managers;
+ std::vector<UP<CSinglePixelBufferResource>> m_buffers;
friend class CSinglePixelBufferManagerResource;
friend class CSinglePixelBufferResource;