summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-01-31 21:43:35 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-01-31 21:43:35 +0100
commit15de0c12ca6393a8c8c849f25a4d016abef0056b (patch)
tree7135c630010aa93b5956ad3b656361801c813cde /src
parent6c9b79b912fed2bd3e40fcf620087468730cf4e3 (diff)
downloaddabmod-15de0c12ca6393a8c8c849f25a4d016abef0056b.tar.gz
dabmod-15de0c12ca6393a8c8c849f25a4d016abef0056b.tar.bz2
dabmod-15de0c12ca6393a8c8c849f25a4d016abef0056b.zip
CicEqualiser: replace float array by vector
Diffstat (limited to 'src')
-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
+