summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/CicEqualizer.cpp8
-rw-r--r--src/CicEqualizer.h5
2 files changed, 5 insertions, 8 deletions
diff --git a/src/CicEqualizer.cpp b/src/CicEqualizer.cpp
index a9c0dd6..2b74672 100644
--- a/src/CicEqualizer.cpp
+++ b/src/CicEqualizer.cpp
@@ -30,12 +30,12 @@ CicEqualizer::CicEqualizer(size_t nbCarriers, size_t spacing, int R) :
ModCodec(ModFormat(nbCarriers * sizeof(complexf)),
ModFormat(nbCarriers * sizeof(complexf))),
myNbCarriers(nbCarriers),
- mySpacing(spacing)
+ mySpacing(spacing),
+ myFilter(nbCarriers)
{
PDEBUG("CicEqualizer::CicEqualizer(%zu, %zu, %i) @ %p\n",
nbCarriers, spacing, R, this);
- myFilter = new float[nbCarriers];
const int M = 1;
const int N = 4;
const float pi = 4.0f * atanf(1.0f);
@@ -61,10 +61,6 @@ CicEqualizer::CicEqualizer(size_t nbCarriers, size_t spacing, int R) :
CicEqualizer::~CicEqualizer()
{
PDEBUG("CicEqualizer::~CicEqualizer() @ %p\n", this);
-
- if (myFilter != NULL) {
- delete[] myFilter;
- }
}
diff --git a/src/CicEqualizer.h b/src/CicEqualizer.h
index bd8bbda..f8b6edf 100644
--- a/src/CicEqualizer.h
+++ b/src/CicEqualizer.h
@@ -29,7 +29,7 @@
#include "ModCodec.h"
-
+#include <vector>
#include <sys/types.h>
#include <complex>
#ifdef __SSE__
@@ -54,8 +54,9 @@ public:
protected:
size_t myNbCarriers;
size_t mySpacing;
- float* myFilter;
+ std::vector<float> myFilter;
};
#endif //CIC_EQUALIZER_H
+