[libcamera-devel] [PATCH 6/6] android: camera_device: Simplify properties.get()
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sun Dec 27 12:09:19 CET 2020
Hi Jacopo,
Thank you for the patch.
On Wed, Dec 23, 2020 at 06:47:09PM +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.
>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart 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 920baab254b6..fb4c8be34f95 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),
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list