diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-01-31 21:45:25 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-01-31 21:45:25 +0100 |
commit | 6aae848f1866a397004dbe7273f95910f0cf1b9f (patch) | |
tree | b7e3613f64cfcaa5c6bd5868c2916f751306b1e4 /src/PhaseReference.cpp | |
parent | 166e885cf6ea7ff4b56d860bc6449c02d03ef5de (diff) | |
download | dabmod-6aae848f1866a397004dbe7273f95910f0cf1b9f.tar.gz dabmod-6aae848f1866a397004dbe7273f95910f0cf1b9f.tar.bz2 dabmod-6aae848f1866a397004dbe7273f95910f0cf1b9f.zip |
PhaseReference: replace array by vector
Diffstat (limited to 'src/PhaseReference.cpp')
-rw-r--r-- | src/PhaseReference.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/PhaseReference.cpp b/src/PhaseReference.cpp index 208a814..4e4e51a 100644 --- a/src/PhaseReference.cpp +++ b/src/PhaseReference.cpp @@ -71,7 +71,7 @@ PhaseReference::PhaseReference(unsigned int dabmode) : throw std::runtime_error( "PhaseReference::PhaseReference DAB mode not valid!"); } - d_dataIn = new complexf[d_num]; + d_dataIn.resize(d_num); fillData(); myOutputFormat.size(d_carriers * sizeof(complexf)); @@ -81,8 +81,6 @@ PhaseReference::PhaseReference(unsigned int dabmode) : PhaseReference::~PhaseReference() { PDEBUG("PhaseReference::~PhaseReference() @ %p\n", this); - - delete[] d_dataIn; } @@ -162,7 +160,8 @@ int PhaseReference::process(Buffer* const dataIn, Buffer* dataOut) "PhaseReference::process input size not valid!"); } - dataOut->setData(d_dataIn, d_carriers * sizeof(complexf)); + dataOut->setData(&d_dataIn[0], d_carriers * sizeof(complexf)); return 1; } + |