From patchwork Sat Dec 12 03:42:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 10655 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 B0D47BD808 for ; Sat, 12 Dec 2020 03:42:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 05F626033B; Sat, 12 Dec 2020 04:42:23 +0100 (CET) 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="B0YXVrNG"; 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 6E39660327 for ; Sat, 12 Dec 2020 04:42:20 +0100 (CET) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CD33596; Sat, 12 Dec 2020 04:42:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1607744540; bh=Sw/ugCP2FFeCf2UInTqCU+vqqATyevR9oPGR/8McEQY=; h=From:To:Cc:Subject:Date:From; b=B0YXVrNGi6ZEXZVLw9tSdwg0qSTeWruBF2+nhaiW84yjjQuW+pzjISqiNc2Jbyvt0 eqikPbWe8XXRsZTfSehgCiN/PSW+mEbD10fUji3UZFA8yyjsFmSze4uj3auectAeoj M2vIolOPpFgDNxjJJgBDMnwJBi5sX/ydQiTI8Gts= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sat, 12 Dec 2020 05:42:11 +0200 Message-Id: <20201212034211.25174-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] android: camera_device: Replace auto with explicit type 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" The auto keyword facilitates writing code. It avoids typing out very long types, which can make the code more readable, but it can also have a negative impact on readability as it requires the reader (including reviewers) to look up the type of the variable. Replace one occurrence of auto with the explicit type where doing so doesn't require a long type name. Signed-off-by: Laurent Pinchart Reviewed-by: Hirokazu Honda Reviewed-by: Jacopo Mondi --- src/android/camera_device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 38689bdc40b1..79fd02eccdcd 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -199,7 +199,7 @@ void sortCamera3StreamConfigs(std::vector &unsortedConfigs, const auto nv12It = formatToConfigs.find(formats::NV12); if (nv12It != formatToConfigs.end()) { auto &nv12Configs = nv12It->second; - const auto &nv12Largest = nv12Configs.back(); + const Camera3StreamConfig *nv12Largest = nv12Configs.back(); /* * If JPEG will be created from NV12 and the size is larger than