[libcamera-devel] [PATCH 1/5] libcamera: geometry: Don't default-initialize Size unnecessarily
Niklas Söderlund
niklas.soderlund at ragnatech.se
Wed Jul 15 08:20:46 CEST 2020
Hi Laurent,
Thanks for your work.
On 2020-07-15 02:40:05 +0300, Laurent Pinchart wrote:
> Size has a default constructor, there's no need to default-initialize
> instances explicitly. Fix it.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> ---
> src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> index c6cb84e0b0c9..009e502b288c 100644
> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> @@ -418,7 +418,7 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()
>
> unsigned int rawCount = 0, outCount = 0, count = 0, maxIndex = 0;
> std::pair<int, Size> outSize[2];
> - Size maxSize = {};
> + Size maxSize;
> for (StreamConfiguration &cfg : config_) {
> if (isRaw(cfg.pixelFormat)) {
> /*
> @@ -621,7 +621,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)
> for (auto const stream : data->streams_)
> stream->reset();
>
> - Size maxSize = {}, sensorSize = {};
> + Size maxSize, sensorSize;
> unsigned int maxIndex = 0;
> bool rawStream = false;
>
> --
> Regards,
>
> Laurent Pinchart
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
--
Regards,
Niklas Söderlund
More information about the libcamera-devel
mailing list