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:
@@ -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 << " -> ";
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user