From 4f509caa8ed0166ef2e99846f12b7997a37c3a7e Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 15 Jul 2020 01:41:07 +0300 Subject: libcamera: geometry: Give constructors to Rectangle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rectangle, unlike Size, has no constructor, requiring the users to explicitly initialize the instances. This is error-prone, add constructors. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/libcamera/pipeline/raspberrypi') diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index 009e502b..2d848ac3 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -752,12 +752,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config) } /* Adjust aspect ratio by providing crops on the input image. */ - Rectangle crop = { - .x = 0, - .y = 0, - .width = sensorFormat.size.width, - .height = sensorFormat.size.height - }; + Rectangle crop{ 0, 0, sensorFormat.size }; int ar = maxSize.height * sensorFormat.size.width - maxSize.width * sensorFormat.size.height; if (ar > 0) -- cgit v1.2.1