From 34ac44d03499dfe65db417493f0c4f4693e24dd5 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 17 Oct 2023 19:04:48 -0700 Subject: Remove an unnecessary getter --- core/uhjfilter.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/core/uhjfilter.cpp b/core/uhjfilter.cpp index 15dbfb0d..2ae79d30 100644 --- a/core/uhjfilter.cpp +++ b/core/uhjfilter.cpp @@ -137,16 +137,8 @@ struct SplitFilter { template const SplitFilter gSplitFilter; - -const PhaseShifterT PShiftLq{}; -const PhaseShifterT PShiftHq{}; - template -struct GetPhaseShifter; -template<> -struct GetPhaseShifter { static auto& Get() noexcept { return PShiftLq; } }; -template<> -struct GetPhaseShifter { static auto& Get() noexcept { return PShiftHq; } }; +const PhaseShifterT PShifter; /* Filter coefficients for the 'base' all-pass IIR, which applies a frequency- @@ -425,7 +417,7 @@ void UhjDecoder::decode(const al::span samples, const size_t samplesT { static_assert(sInputPadding <= sMaxPadding, "Filter padding is too large"); - const auto &PShift = GetPhaseShifter::Get(); + constexpr auto &PShift = PShifter; ASSUME(samplesToDo > 0); @@ -577,7 +569,7 @@ void UhjStereoDecoder::decode(const al::span samples, const size_t sa { static_assert(sInputPadding <= sMaxPadding, "Filter padding is too large"); - const auto &PShift = GetPhaseShifter::Get(); + constexpr auto &PShift = PShifter; ASSUME(samplesToDo > 0); -- cgit v1.2.3