Commit aa77bc32 authored by Max Kellermann's avatar Max Kellermann

pcm/FloatConvert: make IntegerToFloatSampleConvert::Convert() constexpr

parent 90122969
...@@ -57,8 +57,7 @@ struct IntegerToFloatSampleConvert { ...@@ -57,8 +57,7 @@ struct IntegerToFloatSampleConvert {
static constexpr DV factor = 1.0 / FloatToIntegerSampleConvert<F, Traits>::factor; static constexpr DV factor = 1.0 / FloatToIntegerSampleConvert<F, Traits>::factor;
static_assert(factor > 0, "Wrong factor"); static_assert(factor > 0, "Wrong factor");
gcc_const static constexpr DV Convert(SV src) noexcept {
static DV Convert(SV src) noexcept {
return DV(src) * factor; return DV(src) * factor;
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment