From 82cb3f99bbf676e5d7741dfb90cb5edd6f02a34e Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Fri, 3 Feb 2023 11:27:12 +0100 Subject: [PATCH] Remove unused dScaler variable in FIRFilter.cpp Code is guarded by SOUNDTOUCH_FLOAT_SAMPLES but never actually used. Get rid of it as it triggers a warning under -Werror=unused-variable. -- Cherry-picked from https://gitlab.com/serge-sans-paille/soundtouch/-/tree/fix/remove-unused-float-scaler --- source/SoundTouch/FIRFilter.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/source/SoundTouch/FIRFilter.cpp b/source/SoundTouch/FIRFilter.cpp index 7a6d9ec..478b3b6 100644 --- a/source/SoundTouch/FIRFilter.cpp +++ b/source/SoundTouch/FIRFilter.cpp @@ -75,11 +75,6 @@ FIRFilter::~FIRFilter() uint FIRFilter::evaluateFilterStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples) const { int j, end; -#ifdef SOUNDTOUCH_FLOAT_SAMPLES - // when using floating point samples, use a scaler instead of a divider - // because division is much slower operation than multiplying. - double dScaler = 1.0 / (double)resultDivider; -#endif // hint compiler autovectorization that loop length is divisible by 8 uint ilength = length & -8; @@ -122,11 +117,6 @@ uint FIRFilter::evaluateFilterStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, ui uint FIRFilter::evaluateFilterMono(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples) const { int j, end; -#ifdef SOUNDTOUCH_FLOAT_SAMPLES - // when using floating point samples, use a scaler instead of a divider - // because division is much slower operation than multiplying. - double dScaler = 1.0 / (double)resultDivider; -#endif // hint compiler autovectorization that loop length is divisible by 8 int ilength = length & -8; @@ -161,12 +151,6 @@ uint FIRFilter::evaluateFilterMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, uin { int j, end; -#ifdef SOUNDTOUCH_FLOAT_SAMPLES - // when using floating point samples, use a scaler instead of a divider - // because division is much slower operation than multiplying. - double dScaler = 1.0 / (double)resultDivider; -#endif - assert(length != 0); assert(src != NULL); assert(dest != NULL);