[{"id":11398,"web_url":"https://patchwork.libcamera.org/comment/11398/","msgid":"<20200715062046.GD3051471@oden.dyn.berto.se>","date":"2020-07-15T06:20:46","subject":"Re: [libcamera-devel] [PATCH 1/5] libcamera: geometry: Don't\n\tdefault-initialize Size unnecessarily","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nThanks for your work.\n\nOn 2020-07-15 02:40:05 +0300, Laurent Pinchart wrote:\n> Size has a default constructor, there's no need to default-initialize\n> instances explicitly. Fix it.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index c6cb84e0b0c9..009e502b288c 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -418,7 +418,7 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()\n>  \n>  \tunsigned int rawCount = 0, outCount = 0, count = 0, maxIndex = 0;\n>  \tstd::pair<int, Size> outSize[2];\n> -\tSize maxSize = {};\n> +\tSize maxSize;\n>  \tfor (StreamConfiguration &cfg : config_) {\n>  \t\tif (isRaw(cfg.pixelFormat)) {\n>  \t\t\t/*\n> @@ -621,7 +621,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n>  \tfor (auto const stream : data->streams_)\n>  \t\tstream->reset();\n>  \n> -\tSize maxSize = {}, sensorSize = {};\n> +\tSize maxSize, sensorSize;\n>  \tunsigned int maxIndex = 0;\n>  \tbool rawStream = false;\n>  \n> -- \n> Regards,\n> \n> Laurent Pinchart\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id BF6EFBD790\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 15 Jul 2020 06:20:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8D71260930;\n\tWed, 15 Jul 2020 08:20:48 +0200 (CEST)","from mail-lj1-x244.google.com (mail-lj1-x244.google.com\n\t[IPv6:2a00:1450:4864:20::244])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A276A60929\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 15 Jul 2020 08:20:47 +0200 (CEST)","by mail-lj1-x244.google.com with SMTP id x9so1264375ljc.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 Jul 2020 23:20:47 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\ts28sm256650ljm.24.2020.07.14.23.20.46\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 14 Jul 2020 23:20:46 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"bcixEItj\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=Ha3FE/bg283mf1stCGIZqhvdJA3PuFiSlL1jlJlTPQU=;\n\tb=bcixEItjB71fTs9WWXpGvfASaJNoKebrag1+HKV2Kb1mBt5CkNsHlm8GqQS4amRFex\n\tiwAjZ3OCJkEgiRxlTultdmsIq7t/y83amJSvlUSE31XcJxZ0Rxwn1SOrH/MZit8hy9vb\n\tampfwwrfsWA6mAXNxpdmw9a7MjnOnE90+hRMALQy2Eo6Qoo0YzkNt2IDFOyDyUvucoEn\n\tTpMd654AJLBIjRT+693fJ3O+MSu8E9y45hq7Xh2fc3zwrSOVevx7pWUbtiYliJrxX2uh\n\tksdZ7rlx1CAQhJOhTcofyYCvTIdnwHwne3RBrUVS5+llNZJSfV2gDH2DabGKEo6ZLBLD\n\tv5YA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=Ha3FE/bg283mf1stCGIZqhvdJA3PuFiSlL1jlJlTPQU=;\n\tb=iKAc7z97D+Fjnb9fKzZ1nM7gK4GA/PsJA+8UY7B89Y7o4MlXFWvNsQM8AjxtB8vAFK\n\txLCMhNO/kAGTfwQ+VC14z7aQNqf508JCx6ES3PsroRzorXsv3s/cU/K4JB+plgo1t8m4\n\txRDPMlNJle/vNp54SaZ+WPHdLnEXWUR0Ve7LcTuVfR8NO5injtnHIH3ZFYWukpBBUrCN\n\tnIuasYOzPg5NvzJAlbsQyTSJnkyE6nEkhF3hxlpei7EgF4Fcn7di2/ZCCwttJ8OV4I+p\n\tTnZXaGL92hWubn6Oz5YEWLNbongC8QRThyNfdxb6OCbVqQuLnHtNcZiDozRDqTk5RD2B\n\tPBfw==","X-Gm-Message-State":"AOAM53255UieybcAHuPEWPsMnVud2KAaMsPYG9koccnKkOahZJBL/OQo\n\tSgzp3rzdz9KBr2+dOkAU43ErRwcXmPM=","X-Google-Smtp-Source":"ABdhPJyeB9Q6qI5b4emmYpU1Omngw/Lsrgk0YciN7tNAVs63eXjJf28NiegAyLJ22YPQ4tprYNw7tQ==","X-Received":"by 2002:a2e:9b06:: with SMTP id u6mr3737103lji.24.1594794047088; \n\tTue, 14 Jul 2020 23:20:47 -0700 (PDT)","Date":"Wed, 15 Jul 2020 08:20:46 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20200715062046.GD3051471@oden.dyn.berto.se>","References":"<20200714234009.16596-1-laurent.pinchart@ideasonboard.com>\n\t<20200714234009.16596-2-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200714234009.16596-2-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 1/5] libcamera: geometry: Don't\n\tdefault-initialize Size unnecessarily","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]