mirror of
https://github.com/taglib/taglib.git
synced 2025-11-14 13:42:47 -05:00
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:
@ -167,7 +167,7 @@ namespace
|
||||
int index = 0;
|
||||
|
||||
while(index + 1 < blockSize) {
|
||||
const unsigned char metaId = static_cast<unsigned char>(block[index]);
|
||||
const auto metaId = static_cast<unsigned char>(block[index]);
|
||||
int metaBc = static_cast<unsigned char>(block[index + 1]) << 1;
|
||||
index += 2;
|
||||
|
||||
@ -201,7 +201,7 @@ namespace
|
||||
// if we got DSD block, return the specified rate shift amount
|
||||
|
||||
if(id == ID_DSD_BLOCK && (metaId & ID_UNIQUE) == ID_DSD_BLOCK && metaBc > 0) {
|
||||
const unsigned char rateShift = static_cast<unsigned char>(block[index]);
|
||||
const auto rateShift = static_cast<unsigned char>(block[index]);
|
||||
if(rateShift <= 31)
|
||||
return rateShift;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user