libcamera: camera_sensor: getControls(): Use span
The function takes a const std::vector reference, but it does not actually need an `std::vector`. So use a `libcamera::Span` instead to avoid forcing the caller to construct a vector. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <libcamera/base/class.h>
|
||||
#include <libcamera/base/span.h>
|
||||
|
||||
#include <libcamera/control_ids.h>
|
||||
#include <libcamera/controls.h>
|
||||
@@ -74,7 +75,7 @@ public:
|
||||
virtual BayerFormat::Order bayerOrder(Transform t) const = 0;
|
||||
|
||||
virtual const ControlInfoMap &controls() const = 0;
|
||||
virtual ControlList getControls(const std::vector<uint32_t> &ids) = 0;
|
||||
virtual ControlList getControls(Span<const uint32_t> ids) = 0;
|
||||
virtual int setControls(ControlList *ctrls) = 0;
|
||||
|
||||
virtual const std::vector<controls::draft::TestPatternModeEnum> &
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
|
||||
const ControlInfoMap &controls() const { return controls_; }
|
||||
|
||||
ControlList getControls(const std::vector<uint32_t> &ids);
|
||||
ControlList getControls(Span<const uint32_t> ids);
|
||||
int setControls(ControlList *ctrls);
|
||||
|
||||
const struct v4l2_query_ext_ctrl *controlInfo(uint32_t id) const;
|
||||
|
||||
Reference in New Issue
Block a user