From 83c5a2a7aa67b609bc5c14698b76b9eaee644d17 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Fri, 12 Feb 2021 12:12:49 +0000 Subject: libcamera: controls: Utilise LIBCAMERA_DISABLE_COPY_AND_MOVE The ControlId and Control classes disable the copy constructor and assignment operator, but they should also prevent move construction and assignment. Utilise LIBCAMERA_DISABLE_COPY_AND_MOVE to fully disable these functions. Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- include/libcamera/controls.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include/libcamera/controls.h') diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h index 3b7f3347..1a5690a5 100644 --- a/include/libcamera/controls.h +++ b/include/libcamera/controls.h @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -220,8 +221,7 @@ public: ControlType type() const { return type_; } private: - ControlId &operator=(const ControlId &) = delete; - ControlId(const ControlId &) = delete; + LIBCAMERA_DISABLE_COPY_AND_MOVE(ControlId) unsigned int id_; std::string name_; @@ -260,8 +260,7 @@ public: } private: - Control(const Control &) = delete; - Control &operator=(const Control &) = delete; + LIBCAMERA_DISABLE_COPY_AND_MOVE(Control) }; class ControlInfo -- cgit v1.2.1