diff options
-rw-r--r-- | include/libcamera/controls.h | 10 | ||||
-rw-r--r-- | src/libcamera/controls.cpp | 12 |
2 files changed, 22 insertions, 0 deletions
diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h index 42e6df7e..f24dc764 100644 --- a/include/libcamera/controls.h +++ b/include/libcamera/controls.h @@ -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_; diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp index c23c1b88..c743c13b 100644 --- a/src/libcamera/controls.cpp +++ b/src/libcamera/controls.cpp @@ -384,6 +384,18 @@ std::string ControlRange::toString() const } /** + * \fn bool ControlRange::operator==() + * \brief Compare ControlRange instances for equality + * \return True if the ranges have identical min and max, false otherwise + */ + +/** + * \fn bool ControlRange::operator!=() + * \brief Compare ControlRange instances for non equality + * \return False if the ranges have identical min and max, true otherwise + */ + +/** * \typedef ControlIdMap * \brief A map of numerical control ID to ControlId * |