diff options
author | Chris Robinson <[email protected]> | 2023-10-17 19:04:48 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-10-17 19:04:48 -0700 |
commit | 34ac44d03499dfe65db417493f0c4f4693e24dd5 (patch) | |
tree | a86df64a36e1f22f6ce981d6d5ce58f2da58d9d3 /core | |
parent | 5b3d6e629cd4145f302d8aea132ba406433dbf17 (diff) |
Remove an unnecessary getter
Diffstat (limited to 'core')
-rw-r--r-- | core/uhjfilter.cpp | 14 |
1 files 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<size_t N> const SplitFilter<N> gSplitFilter; - -const PhaseShifterT<UhjLength256> PShiftLq{}; -const PhaseShifterT<UhjLength512> PShiftHq{}; - template<size_t N> -struct GetPhaseShifter; -template<> -struct GetPhaseShifter<UhjLength256> { static auto& Get() noexcept { return PShiftLq; } }; -template<> -struct GetPhaseShifter<UhjLength512> { static auto& Get() noexcept { return PShiftHq; } }; +const PhaseShifterT<N> PShifter; /* Filter coefficients for the 'base' all-pass IIR, which applies a frequency- @@ -425,7 +417,7 @@ void UhjDecoder<N>::decode(const al::span<float*> samples, const size_t samplesT { static_assert(sInputPadding <= sMaxPadding, "Filter padding is too large"); - const auto &PShift = GetPhaseShifter<N>::Get(); + constexpr auto &PShift = PShifter<N>; ASSUME(samplesToDo > 0); @@ -577,7 +569,7 @@ void UhjStereoDecoder<N>::decode(const al::span<float*> samples, const size_t sa { static_assert(sInputPadding <= sMaxPadding, "Filter padding is too large"); - const auto &PShift = GetPhaseShifter<N>::Get(); + constexpr auto &PShift = PShifter<N>; ASSUME(samplesToDo > 0); |