diff options
author | Barnabás Pőcze <barnabas.pocze@ideasonboard.com> | 2025-02-05 17:58:30 +0100 |
---|---|---|
committer | Barnabás Pőcze <barnabas.pocze@ideasonboard.com> | 2025-03-21 16:09:39 +0100 |
commit | bb7f702b489009d840c546864de67df5ddd2bc5e (patch) | |
tree | b2f2f649cb40d76cc179e1547d1669e3a209645f /src | |
parent | 314ecb54002d5d6727f1f71e6bf1f13831607ee9 (diff) |
apps: qcam: Simplify `PixelFormat` search
Since `PixelFormat` has `operator==()`, `std::find()` can be used
directly, so do that to simplify.
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/apps/qcam/main_window.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/apps/qcam/main_window.cpp b/src/apps/qcam/main_window.cpp index 3880a846..d2ccbd23 100644 --- a/src/apps/qcam/main_window.cpp +++ b/src/apps/qcam/main_window.cpp @@ -386,10 +386,7 @@ int MainWindow::startCapture() /* Use a format supported by the viewfinder if available. */ std::vector<PixelFormat> formats = vfConfig.formats().pixelformats(); for (const PixelFormat &format : viewfinder_->nativeFormats()) { - auto match = std::find_if(formats.begin(), formats.end(), - [&](const PixelFormat &f) { - return f == format; - }); + auto match = std::find(formats.begin(), formats.end(), format); if (match != formats.end()) { vfConfig.pixelFormat = format; break; |