From aa77bc323f0e8c55bdf08211a3e3ea738f0e9f5f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 29 Oct 2018 23:52:25 +0100 Subject: [PATCH] pcm/FloatConvert: make IntegerToFloatSampleConvert::Convert() constexpr --- src/pcm/FloatConvert.hxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pcm/FloatConvert.hxx b/src/pcm/FloatConvert.hxx index 70b00bcba..8f77227ec 100644 --- a/src/pcm/FloatConvert.hxx +++ b/src/pcm/FloatConvert.hxx @@ -57,8 +57,7 @@ struct IntegerToFloatSampleConvert { static constexpr DV factor = 1.0 / FloatToIntegerSampleConvert::factor; static_assert(factor > 0, "Wrong factor"); - gcc_const - static DV Convert(SV src) noexcept { + static constexpr DV Convert(SV src) noexcept { return DV(src) * factor; } };