libcamera: Standardize on 'const auto'

'const auto' and 'auto const' are interchangeable in C++. There are 446
occurrences of the former in the code base, and 67 occurrences of the
latter. Standardize on the winner.

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 16:05:34 +02:00
parent 5a44c5af06
commit 993968d80e
26 changed files with 65 additions and 65 deletions
@@ -66,15 +66,15 @@ void MediaDevicePrintTest::printMediaGraph(const MediaDevice &media, ostream &os
{
os << "\n" << media.driver() << " - " << media.deviceNode() << "\n\n";
for (auto const &entity : media.entities()) {
for (const auto &entity : media.entities()) {
os << "\"" << entity->name() << "\"\n";
for (auto const &sink : entity->pads()) {
for (const auto &sink : entity->pads()) {
if (!(sink->flags() & MEDIA_PAD_FL_SINK))
continue;
os << " [" << sink->index() << "]" << ": Sink\n";
for (auto const &link : sink->links()) {
for (const auto &link : sink->links()) {
os << "\t";
printNode(sink, os);
os << " <- ";
@@ -84,12 +84,12 @@ void MediaDevicePrintTest::printMediaGraph(const MediaDevice &media, ostream &os
os << "\n";
}
for (auto const &source : entity->pads()) {
for (const auto &source : entity->pads()) {
if (!(source->flags() & MEDIA_PAD_FL_SOURCE))
continue;
os << " [" << source->index() << "]" << ": Source\n";
for (auto const &link : source->links()) {
for (const auto &link : source->links()) {
os << "\t";
printNode(source, os);
os << " -> ";
+1 -1
View File
@@ -133,7 +133,7 @@ public:
if (!cache.isEmpty())
return TestFail;
for (auto const &buffer : buffers) {
for (const auto &buffer : buffers) {
FrameBuffer &b = *buffer.get();
cache.get(b);
}