diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-03-15 23:33:21 -0700 |
---|---|---|
committer | Rosen Penev <rosenp@gmail.com> | 2020-03-16 12:43:24 -0700 |
commit | 6d91b5c7b21926137c63561e313afd1fb72274f8 (patch) | |
tree | fb3424a20e839954df416e1af8316fc3ca3b9f78 /src/ReplayGainInfo.cxx | |
parent | fd71514068be53a98c8f4b87d3164fd632ab24cb (diff) |
fix double promotions
Found with -Wdouble-promotion
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src/ReplayGainInfo.cxx')
-rw-r--r-- | src/ReplayGainInfo.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ReplayGainInfo.cxx b/src/ReplayGainInfo.cxx index 76713aded..de6ec0ab3 100644 --- a/src/ReplayGainInfo.cxx +++ b/src/ReplayGainInfo.cxx @@ -27,13 +27,13 @@ ReplayGainTuple::CalculateScale(const ReplayGainConfig &config) const noexcept float scale; if (IsDefined()) { - scale = pow(10.0, gain / 20.0); + scale = std::pow(10.0f, gain / 20.0f); scale *= config.preamp; - if (scale > 15.0) - scale = 15.0; + if (scale > 15.0f) + scale = 15.0f; - if (config.limit && scale * peak > 1.0) - scale = 1.0 / peak; + if (config.limit && scale * peak > 1.0f) + scale = 1.0f / peak; } else scale = config.missing_preamp; |