clang-tidy: Use auto where it improves the readability

run-clang-tidy -header-filter='.*' -checks='-*,modernize-use-auto' \
-config="{CheckOptions: [{key: modernize-use-auto.RemoveStars, value: '1'}]}" \
-fix

Manually fixed some wrong `const auto` replacements and verified
that all types are deduced correctly.
This commit is contained in:
Urs Fleisch
2023-07-16 06:13:34 +02:00
parent 63922f2676
commit c2c9e8989c
57 changed files with 289 additions and 299 deletions

View File

@@ -323,7 +323,7 @@ public:
unsigned int size() const override
{
unsigned int size = 0;
for(List<Reader*>::ConstIterator i = m_readers.begin();
for(auto i = m_readers.begin();
i != m_readers.end(); ++ i) {
size += (*i)->size();
}
@@ -333,7 +333,7 @@ public:
unsigned int read(TagLib::File &file, unsigned int limit) override
{
unsigned int sumcount = 0;
for(List<Reader*>::ConstIterator i = m_readers.cbegin();
for(auto i = m_readers.cbegin();
limit > 0 && i != m_readers.cend(); ++ i) {
unsigned int count = (*i)->read(file, limit);
limit -= count;