From c827879613edb92b06735cb43fc8164d96fd63ce Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 15 Feb 2018 18:47:46 +0100 Subject: [PATCH] AF Squelch: removed useless default constructor --- sdrbase/dsp/afsquelch.cpp | 38 -------------------------------------- sdrbase/dsp/afsquelch.h | 2 -- 2 files changed, 40 deletions(-) diff --git a/sdrbase/dsp/afsquelch.cpp b/sdrbase/dsp/afsquelch.cpp index 1a4dec122..361478d12 100644 --- a/sdrbase/dsp/afsquelch.cpp +++ b/sdrbase/dsp/afsquelch.cpp @@ -20,44 +20,6 @@ #undef M_PI #define M_PI 3.14159265358979323846 -AFSquelch::AFSquelch() : - m_nbAvg(128), - m_N(0), - m_sampleRate(0), - m_samplesProcessed(0), - m_samplesAvgProcessed(0), - m_maxPowerIndex(0), - m_nTones(2), - m_samplesAttack(0), - m_attackCount(0), - m_samplesDecay(0), - m_decayCount(0), - m_squelchCount(0), - m_isOpen(false), - m_threshold(0.0) -{ - m_k = new double[m_nTones]; - m_coef = new double[m_nTones]; - m_toneSet = new double[m_nTones]; - m_u0 = new double[m_nTones]; - m_u1 = new double[m_nTones]; - m_power = new double[m_nTones]; - m_movingAverages.resize(m_nTones, MovingAverage(m_nbAvg, 0.0f)); - - m_toneSet[0] = 2000.0; - m_toneSet[1] = 10000.0; - - for (unsigned int j = 0; j < m_nTones; ++j) - { - m_k[j] = ((double)m_N * m_toneSet[j]) / (double)m_sampleRate; - m_coef[j] = 2.0 * cos((2.0 * M_PI * m_toneSet[j])/(double)m_sampleRate); - m_u0[j] = 0.0; - m_u1[j] = 0.0; - m_power[j] = 0.0; - m_movingAverages[j].fill(0.0); - } -} - AFSquelch::AFSquelch(unsigned int nbTones, const double *tones) : m_nbAvg(128), m_N(0), diff --git a/sdrbase/dsp/afsquelch.h b/sdrbase/dsp/afsquelch.h index 503dd4893..d3e66447c 100644 --- a/sdrbase/dsp/afsquelch.h +++ b/sdrbase/dsp/afsquelch.h @@ -25,8 +25,6 @@ */ class AFSquelch { public: - // Constructors and Destructor - AFSquelch(); // allows user defined tone pair AFSquelch(unsigned int nbTones, const double *tones);