mirror of
https://github.com/taglib/taglib.git
synced 2026-08-14 06:17:00 -04:00
convert const double to const auto
Fixes some Wconversion warnings. Signed-off-by: Rosen Penev <[email protected]>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user