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:
@@ -60,11 +60,15 @@ protected:
|
||||
const ControlInfo &u8 = infoMap.find(VIVID_CID_U8_4D_ARRAY)->second;
|
||||
|
||||
/* Test getting controls. */
|
||||
ControlList ctrls = capture_->getControls({ V4L2_CID_BRIGHTNESS,
|
||||
V4L2_CID_CONTRAST,
|
||||
V4L2_CID_SATURATION,
|
||||
VIVID_CID_INTEGER64,
|
||||
VIVID_CID_U8_4D_ARRAY });
|
||||
static constexpr uint32_t cids[] = {
|
||||
V4L2_CID_BRIGHTNESS,
|
||||
V4L2_CID_CONTRAST,
|
||||
V4L2_CID_SATURATION,
|
||||
VIVID_CID_INTEGER64,
|
||||
VIVID_CID_U8_4D_ARRAY,
|
||||
};
|
||||
|
||||
ControlList ctrls = capture_->getControls(cids);
|
||||
if (ctrls.empty()) {
|
||||
cerr << "Failed to get controls" << endl;
|
||||
return TestFail;
|
||||
|
||||
Reference in New Issue
Block a user