From 470fa978a85301136ffb8c7a8c53461e7527c2ab Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 15 Aug 2025 13:42:08 +0300 Subject: [PATCH] pipeline: rpi: Use structured bindings in range-based for loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simplify a range-based for loop by replacing an iterator with structure bindings. This makes the code easier to read. Signed-off-by: Laurent Pinchart Reviewed-by: Barnabás Pőcze Reviewed-by: Jacopo Mondi --- src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp index 563df198..09d30f34 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp @@ -882,10 +882,10 @@ void PipelineHandlerBase::mapBuffers(Camera *camera, const BufferMap &buffers, u * This will allow us to identify buffers passed between the pipeline * handler and the IPA. */ - for (auto const &it : buffers) { - bufferIds.push_back(IPABuffer(mask | it.first, - it.second.buffer->planes())); - data->bufferIds_.insert(mask | it.first); + for (auto const &[id, buffer] : buffers) { + bufferIds.push_back(IPABuffer(mask | id, + buffer.buffer->planes())); + data->bufferIds_.insert(mask | id); } data->ipa_->mapBuffers(bufferIds);