[libcamera-devel] [PATCH v2 5/5] android: camera_device: Simplify properties.get()
paul.elder at ideasonboard.com
paul.elder at ideasonboard.com
Tue Dec 29 05:55:16 CET 2020
Hi Jacopo,
On Mon, Dec 28, 2020 at 05:40:03PM +0100, Jacopo Mondi wrote:
> When accessing the value of a property by reading the properties
> ControlList content with ControlList::get<>() it is not necessary to
> specify the template type as it is already conveyed by the Control
> instance provided as first argument.
>
> Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>
> ---
> src/android/camera_device.cpp | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index bbf016c323a7..7678d4485ce9 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -853,7 +853,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
> /* Sensor static metadata. */
> if (properties.contains(properties::PixelArraySize)) {
> const Size &size =
> - properties.get<Size>(properties::PixelArraySize);
> + properties.get(properties::PixelArraySize);
> std::vector<int32_t> data{
> static_cast<int32_t>(size.width),
> static_cast<int32_t>(size.height),
> @@ -872,7 +872,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
>
> if (properties.contains(properties::PixelArrayActiveAreas)) {
> const Span<const Rectangle> &rects =
> - properties.get<Span<const Rectangle>>(properties::PixelArrayActiveAreas);
> + properties.get(properties::PixelArrayActiveAreas);
> std::vector<int32_t> data{
> static_cast<int32_t>(rects[0].x),
> static_cast<int32_t>(rects[0].y),
> --
> 2.29.2
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
More information about the libcamera-devel
mailing list