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:
Barnabás Pőcze
2024-08-04 01:37:18 +02:00
parent 01a9b83f38
commit 39d37fce12
6 changed files with 31 additions and 18 deletions
+1 -1
View File
@@ -174,7 +174,7 @@ void V4L2Device::close()
* \return The control values in a ControlList on success, or an empty list on
* error
*/
ControlList V4L2Device::getControls(const std::vector<uint32_t> &ids)
ControlList V4L2Device::getControls(Span<const uint32_t> ids)
{
if (ids.empty())
return {};