diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-10-12 06:35:21 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-10-13 20:37:30 +0300 |
commit | 273b87c781554b33b641a9aea017a80570749b11 (patch) | |
tree | 1fb8a8df0f6f4a81482f9f7c5adb7e25442844fb /include | |
parent | 33ee44dc16dc7e6fd15926d76a10545601a20613 (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.h | 6 |
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_; |