From ad37b1b212c9b03db45d4712ef71e2373287fabd Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sat, 30 Oct 2021 06:25:05 -0400 Subject: [PATCH] Make default implementation of dsp::convert() the default cast. --- include/dsp/convert.hpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/include/dsp/convert.hpp b/include/dsp/convert.hpp index f41f7e50..15893a0e 100644 --- a/include/dsp/convert.hpp +++ b/include/dsp/convert.hpp @@ -16,14 +16,11 @@ struct __attribute__((packed)) int24_t { static_assert(sizeof(int24_t) == 3, "int24_t type must be 3 bytes"); -/** Converts between normalized types */ +/** Converts between normalized types. +Default implementation is the default cast. +*/ template -To convert(From x); - - -/** Trivial conversion */ -template -To convert(To x) {return x;} +To convert(From x) {return x;} /** Integer to float */