diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-07-15 01:41:07 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-07-15 17:29:59 +0300 |
commit | 4f509caa8ed0166ef2e99846f12b7997a37c3a7e (patch) | |
tree | 5ff55b3f5a5948e3a0d00333143f71f1ce97f0a8 /src/libcamera/pipeline/raspberrypi | |
parent | 935aec66ae50ec2448e052c95757b2a83e3999ba (diff) |
libcamera: geometry: Give constructors to Rectangle
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 <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/pipeline/raspberrypi')
-rw-r--r-- | src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
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) |