libcamera: Replace iterators with range-based for loops

Use range-based for loops instead of iterators when iterating over a
container. This improves readability.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
This commit is contained in:
Laurent Pinchart
2026-02-12 15:36:02 +02:00
parent be88125af1
commit a736fe8531
3 changed files with 26 additions and 36 deletions
+2 -2
View File
@@ -45,10 +45,10 @@ int Agc::read(const libcamera::YamlObject &params)
}
const auto &channels = params["channels"].asList();
for (auto ch = channels.begin(); ch != channels.end(); ch++) {
for (const auto &ch : channels) {
LOG(RPiAgc, Debug) << "Read AGC channel";
channelData_.emplace_back();
int ret = channelData_.back().channel.read(*ch, getHardwareConfig());
int ret = channelData_.back().channel.read(ch, getHardwareConfig());
if (ret)
return ret;
}