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 <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Kieran Bingham 2021-02-12 12:12:49 +00:00
parent 234ee71517
commit 83c5a2a7aa

View file

@ -14,6 +14,7 @@
#include <unordered_map>
#include <vector>
#include <libcamera/class.h>
#include <libcamera/geometry.h>
#include <libcamera/span.h>
@ -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