pcm/FloatConvert: make IntegerToFloatSampleConvert::Convert() constexpr
This commit is contained in:
parent
901229699e
commit
aa77bc323f
|
@ -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;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue