alphamodifier: move to unique ptrs

less refcounting, move by rvalue.
This commit is contained in:
Tom Englund 2025-07-10 12:47:21 +02:00 committed by Vaxry
parent f5af40afce
commit 37be9a8959
2 changed files with 7 additions and 7 deletions

View file

@ -11,13 +11,13 @@ class CAlphaModifierProtocol;
class CAlphaModifier {
public:
CAlphaModifier(SP<CWpAlphaModifierSurfaceV1> resource_, SP<CWLSurfaceResource> surface);
CAlphaModifier(UP<CWpAlphaModifierSurfaceV1>&& resource_, SP<CWLSurfaceResource> surface);
bool good();
void setResource(SP<CWpAlphaModifierSurfaceV1> resource);
void setResource(UP<CWpAlphaModifierSurfaceV1>&& resource);
private:
SP<CWpAlphaModifierSurfaceV1> m_resource;
UP<CWpAlphaModifierSurfaceV1> m_resource;
WP<CWLSurfaceResource> m_surface;
float m_alpha = 1.0;