use some more auto (#1146)

This commit is contained in:
Rosen Penev
2023-09-16 13:12:04 +02:00
committed by GitHub
parent 653c2fe9e1
commit bdf50eda99
6 changed files with 10 additions and 13 deletions
+3 -3
View File
@@ -150,7 +150,7 @@ namespace
tmp = b[0];
size = (size << 7) | (tmp & 0x7F);
sizeLength++;
} while((tmp & 0x80));
} while(tmp & 0x80);
return size;
}
@@ -288,13 +288,13 @@ void MPC::Properties::readSV7(const ByteVector &data, offset_t streamLength)
// convert gain info
if(d->trackGain != 0) {
int tmp = static_cast<int>((64.82 - static_cast<short>(d->trackGain) / 100.) * 256. + .5);
auto tmp = static_cast<int>((64.82 - static_cast<short>(d->trackGain) / 100.) * 256. + .5);
if(tmp >= (1 << 16) || tmp < 0) tmp = 0;
d->trackGain = tmp;
}
if(d->albumGain != 0) {
int tmp = static_cast<int>((64.82 - d->albumGain / 100.) * 256. + .5);
auto tmp = static_cast<int>((64.82 - d->albumGain / 100.) * 256. + .5);
if(tmp >= (1 << 16) || tmp < 0) tmp = 0;
d->albumGain = tmp;
}