From ca3cbbce849342340c88deb3c5bc2dc39a3294ce Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Sun, 7 Oct 2018 20:35:14 +0300 Subject: [PATCH] [colorcorrection] Make GammaRamp non-copyable Summary: GammaRamp deletes an array in the destructor thus we have to either declare our own copy constructor and copy assignment operator or delete them both. GammaRamp looks more like an identity rather than a value so both copy constructor and copy assignment operator were deleted. Test Plan: Compiles. Reviewers: #kwin, romangg Reviewed By: #kwin, romangg Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16023 --- colorcorrection/gammaramp.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/colorcorrection/gammaramp.h b/colorcorrection/gammaramp.h index 53ef606b57..b215af168a 100644 --- a/colorcorrection/gammaramp.h +++ b/colorcorrection/gammaramp.h @@ -42,6 +42,9 @@ struct GammaRamp { uint16_t *red = nullptr; uint16_t *green = nullptr; uint16_t *blue = nullptr; + +private: + Q_DISABLE_COPY(GammaRamp) }; }