From patchwork Thu Jul 23 23:38:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 8943 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id F0429BD86F for ; Thu, 23 Jul 2020 23:39:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 737166117A; Fri, 24 Jul 2020 01:39:08 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="rkMLcWA/"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E5FDA60539 for ; Fri, 24 Jul 2020 01:39:06 +0200 (CEST) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6C261279 for ; Fri, 24 Jul 2020 01:39:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1595547546; bh=szy+itzWBdb9K54qSYEspsiAoYBmDFbFIJ/7rP/Lzbg=; h=From:To:Subject:Date:From; b=rkMLcWA/dLW0bwG4x11CkdgcJ5lil//dLwyUhyMX+A3DIwvbUYksf7bZ7xcdVvikN he/2wV/EQItO2Sd+GhejucoogWNPsWd9yA44nID8035E7YFGKdchitwdc1+gtRodsd VH0C6TxEPvy/kXQrywk9zfi+bYltt/HeTS1o7oGU= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Fri, 24 Jul 2020 02:38:52 +0300 Message-Id: <20200723233852.17415-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: formats: Remove unnecessary explicit constructor calls X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" When initializing the PixelFormatInfo::format field with a PixelFormat, there's no need to cal the PixelFormat (copy) constructor explicitly. Remove the unnecessary calls. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Kieran Bingham --- src/libcamera/formats.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp index 60b42ce23c21..11774b0cfb12 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -321,7 +321,7 @@ const std::map pixelFormatInfo{ } }, { formats::YUV420, { .name = "YUV420", - .format = PixelFormat(formats::YUV420), + .format = formats::YUV420, .v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_YUV420), .bitsPerPixel = 12, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, @@ -331,7 +331,7 @@ const std::map pixelFormatInfo{ } }, { formats::YVU420, { .name = "YVU420", - .format = PixelFormat(formats::YVU420), + .format = formats::YVU420, .v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_YVU420), .bitsPerPixel = 12, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, @@ -341,7 +341,7 @@ const std::map pixelFormatInfo{ } }, { formats::YUV422, { .name = "YUV422", - .format = PixelFormat(formats::YUV422), + .format = formats::YUV422, .v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_YUV422P), .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingYUV,