diff --git a/lib/audiodev/LtRtProcessing.cpp b/lib/audiodev/LtRtProcessing.cpp index da4e0f2..1d93784 100644 --- a/lib/audiodev/LtRtProcessing.cpp +++ b/lib/audiodev/LtRtProcessing.cpp @@ -9,9 +9,9 @@ namespace boo { namespace { template -T ClampFull(float in) { - if (std::is_floating_point()) { - return std::min(std::max(in, -1.f), 1.f); +constexpr T ClampFull(float in) { + if constexpr (std::is_floating_point_v) { + return std::clamp(in, -1.f, 1.f); } else { constexpr T MAX = std::numeric_limits::max(); constexpr T MIN = std::numeric_limits::min();