libcamera: controls: Add operator== and operator!= to ControlRange
Allow comparision of control ranges by adding the required operators. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
@@ -112,6 +112,16 @@ public:
|
||||
|
||||
std::string toString() const;
|
||||
|
||||
bool operator==(const ControlRange &other) const
|
||||
{
|
||||
return min_ == other.min_ && max_ == other.max_;
|
||||
}
|
||||
|
||||
bool operator!=(const ControlRange &other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
private:
|
||||
ControlValue min_;
|
||||
ControlValue max_;
|
||||
|
||||
Reference in New Issue
Block a user