From 94f0070abd24cac0702e612d7ba8039d6de5a0c3 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 9 Nov 2021 14:41:43 -0500 Subject: [PATCH] Make dsp::convert() default template deleted. Add trivial implementation. --- include/dsp/convert.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/dsp/convert.hpp b/include/dsp/convert.hpp index 46a1ffbe..0677973c 100644 --- a/include/dsp/convert.hpp +++ b/include/dsp/convert.hpp @@ -24,10 +24,14 @@ static_assert(sizeof(Int24) == 3, "Int24 type must be 3 bytes"); /** Converts between normalized types. -Default implementation is the default cast. */ template -To convert(From x) {return x;} +To convert(From x) = delete; + + +/** Trivial conversions */ +template <> +inline float convert(float x) {return x;} /** Integer to float */