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>
This commit is contained in:
committed by
Jacopo Mondi
parent
e7d7c99f4b
commit
8258bd6ad6
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user