pcm: declare IsSilentSample as const
GNU libstdc++ declares cmath functions as constexpr, but libc++ does not. The C++ standards state the standard library functions should not be declared constexpr unless explicitly required.
This commit is contained in:
parent
838af929a0
commit
a482c798ad
@ -86,7 +86,8 @@ CalcStereoRMS(std::span<const ReplayGainAnalyzer::Frame> src) noexcept
|
|||||||
return 10 * std::log10(sum / src.size()) + 90.0 - 3.0;
|
return 10 * std::log10(sum / src.size()) + 90.0 - 3.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr bool
|
[[gnu::const]]
|
||||||
|
static bool
|
||||||
IsSilentSample(float value) noexcept
|
IsSilentSample(float value) noexcept
|
||||||
{
|
{
|
||||||
return std::fabs(value) <= 1e-10f;
|
return std::fabs(value) <= 1e-10f;
|
||||||
|
Loading…
Reference in New Issue
Block a user