From 273b87c781554b33b641a9aea017a80570749b11 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 12 Oct 2019 06:35:21 +0300 Subject: libcamera: controls: Add comparison operators for ControlValue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add equality and non equality comparison operators for the ControlValue class. This simplifies code that deals with control values. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Tested-by: Niklas Söderlund Reviewed-by: Niklas Söderlund --- include/libcamera/controls.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/libcamera/controls.h') diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h index d8acd800..342251c2 100644 --- a/include/libcamera/controls.h +++ b/include/libcamera/controls.h @@ -40,6 +40,12 @@ public: std::string toString() const; + bool operator==(const ControlValue &other) const; + bool operator!=(const ControlValue &other) const + { + return !(*this == other); + } + private: ControlType type_; -- cgit v1.2.1