convert const double to const auto

Fixes some Wconversion warnings.

Signed-off-by: Rosen Penev <[email protected]>
This commit is contained in:
Rosen Penev
2024-01-22 18:35:30 +01:00
committed by Urs Fleisch
parent a08acdcf23
commit e1ac724cfe
10 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -227,7 +227,7 @@ void MPC::Properties::readSV8(File *file, offset_t streamLength)
if(const auto frameCount = d->sampleFrames - begSilence;
frameCount > 0 && d->sampleRate > 0) {
const double length = frameCount * 1000.0 / d->sampleRate;
const auto length = static_cast<double>(frameCount) * 1000.0 / d->sampleRate;
d->length = static_cast<int>(length + 0.5);
d->bitrate = static_cast<int>(streamLength * 8.0 / length + 0.5);
}
@@ -327,7 +327,7 @@ void MPC::Properties::readSV7(const ByteVector &data, offset_t streamLength)
}
if(d->sampleFrames > 0 && d->sampleRate > 0) {
const double length = d->sampleFrames * 1000.0 / d->sampleRate;
const auto length = static_cast<double>(d->sampleFrames) * 1000.0 / d->sampleRate;
d->length = static_cast<int>(length + 0.5);
if(d->bitrate == 0)