summaryrefslogtreecommitdiff
path: root/src/apps/qcam
diff options
context:
space:
mode:
authorBarnabás Pőcze <pobrn@protonmail.com>2023-05-02 17:55:53 +0000
committerJacopo Mondi <jacopo.mondi@ideasonboard.com>2023-05-04 11:04:03 +0200
commit8258bd6ad64c0223d6371e8a194f3b315d4c5932 (patch)
treeb6001169fd74249d0b28f87e8118ac57ea6f7ce4 /src/apps/qcam
parente7d7c99f4b7bb44ebedc3dc118c58292365ac3a4 (diff)
apps: qcam: Remove redundant check
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 <pobrn@protonmail.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Diffstat (limited to 'src/apps/qcam')
-rw-r--r--src/apps/qcam/main_window.cpp7
1 files changed, 2 insertions, 5 deletions
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. */