From a3a4c4d4944a0c6c8f9e3fd3e2f2433f4408ef04 Mon Sep 17 00:00:00 2001 From: Luuk van Dijk Date: Wed, 4 Jan 2017 09:46:35 +0100 Subject: [PATCH] fixed 4 delete[]'s fixed 4 instances of new[] allocated pointers being freed by delete instead of delete[] --- digitalfiltering.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/digitalfiltering.cpp b/digitalfiltering.cpp index 8104c6f2..b123f10d 100644 --- a/digitalfiltering.cpp +++ b/digitalfiltering.cpp @@ -135,8 +135,8 @@ void DigitalFiltering::dft(int dir, int len, double *real, double *imag) { } } - delete x2; - delete y2; + delete[] x2; + delete[] y2; } void DigitalFiltering::fftshift(double *data, int len) @@ -298,8 +298,8 @@ QVector DigitalFiltering::fftWithShift(QVector &signal, int resu result.append(fabs(signal_vector[i]) / div_factor); } - delete signal_vector; - delete imag; + delete[] signal_vector; + delete[] imag; return result; }