[libcamera-devel] [PATCH 1/2] libcamera: control: define an explicit default ControlInfo constructor
Christian Rauch
Rauch.Christian at gmx.de
Sun Aug 21 14:43:42 CEST 2022
The default ControlInfo constructor allowed to partially initialised the
min/max/def values. Add an explicit default constructor in order to enforce
that either all or none of the min/max/def values are defined.
Signed-off-by: Christian Rauch <Rauch.Christian at gmx.de>
---
include/libcamera/controls.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h
index ebc168fc..214ad7f3 100644
--- a/include/libcamera/controls.h
+++ b/include/libcamera/controls.h
@@ -268,9 +268,10 @@ private:
class ControlInfo
{
public:
- explicit ControlInfo(const ControlValue &min = 0,
- const ControlValue &max = 0,
- const ControlValue &def = 0);
+ explicit ControlInfo() = default;
+ explicit ControlInfo(const ControlValue &min,
+ const ControlValue &max,
+ const ControlValue &def);
explicit ControlInfo(Span<const ControlValue> values,
const ControlValue &def = {});
explicit ControlInfo(std::set<bool> values, bool def);
--
2.34.1
More information about the libcamera-devel
mailing list