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>
This commit is contained in:
Laurent Pinchart 2019-10-12 06:35:21 +03:00
parent 33ee44dc16
commit 273b87c781
2 changed files with 33 additions and 0 deletions

View file

@ -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_;