summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-12 06:35:21 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-13 20:37:30 +0300
commit273b87c781554b33b641a9aea017a80570749b11 (patch)
tree1fb8a8df0f6f4a81482f9f7c5adb7e25442844fb /include
parent33ee44dc16dc7e6fd15926d76a10545601a20613 (diff)
libcamera: controls: Add comparison operators for ControlValue
Add equality and non equality comparison operators for the ControlValue class. This simplifies code that deals with control values. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Tested-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/controls.h6
1 files changed, 6 insertions, 0 deletions
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_;