From 8258bd6ad64c0223d6371e8a194f3b315d4c5932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Tue, 2 May 2023 17:55:53 +0000 Subject: apps: qcam: Remove redundant check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The switch statement checks `roles.size()` with cases for 1 and 2, so in the `default` branch, `role.size() > 2`, i.e. it is always different from 1, so the check is unnecessary. Signed-off-by: Barnabás Pőcze Reviewed-by: Jacopo Mondi Reviewed-by: Umang Jain Signed-off-by: Jacopo Mondi --- src/apps/qcam/main_window.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/apps') diff --git a/src/apps/qcam/main_window.cpp b/src/apps/qcam/main_window.cpp index fb2db4aa..680668df 100644 --- a/src/apps/qcam/main_window.cpp +++ b/src/apps/qcam/main_window.cpp @@ -381,11 +381,8 @@ int MainWindow::startCapture() } break; default: - if (roles.size() != 1) { - qWarning() << "Unsupported stream configuration"; - return -EINVAL; - } - break; + qWarning() << "Unsupported stream configuration"; + return -EINVAL; } /* Configure the camera. */ -- cgit v1.2.1