summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-12-12 05:22:31 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-12-14 15:35:03 +0200
commitbd4894d2596168b3435fb93b9e53dad84b2dcc7e (patch)
treef17e9bdd1f2a5e61979c1084a514a021c86a33a2
parent008f2a55d141d4e5257ed83e7714d88734d67dde (diff)
android: camera_device: Replace auto with explicit type
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
-rw-r--r--src/android/camera_device.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 89f10e74..1c7bf4ed 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -199,7 +199,7 @@ void sortCamera3StreamConfigs(std::vector<Camera3StreamConfig> &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