libcamera: camera_sensor: getFormat(): 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: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -74,7 +74,7 @@ public:
|
||||
std::vector<Size> sizes(unsigned int mbusCode) const override;
|
||||
Size resolution() const override;
|
||||
|
||||
V4L2SubdeviceFormat getFormat(const std::vector<unsigned int> &mbusCodes,
|
||||
V4L2SubdeviceFormat getFormat(Span<const unsigned int> mbusCodes,
|
||||
const Size &size,
|
||||
const Size maxSize) const override;
|
||||
int setFormat(V4L2SubdeviceFormat *format,
|
||||
@@ -757,7 +757,7 @@ Size CameraSensorRaw::resolution() const
|
||||
}
|
||||
|
||||
V4L2SubdeviceFormat
|
||||
CameraSensorRaw::getFormat(const std::vector<unsigned int> &mbusCodes,
|
||||
CameraSensorRaw::getFormat(Span<const unsigned int> mbusCodes,
|
||||
const Size &size, Size maxSize) const
|
||||
{
|
||||
unsigned int desiredArea = size.width * size.height;
|
||||
|
||||
Reference in New Issue
Block a user