It is always better to initialize variables

This commit is contained in:
Geoffrey Merck 2020-02-03 21:26:41 +01:00
parent de961853c7
commit adbea50027
1 changed files with 1 additions and 0 deletions

View File

@ -30,6 +30,7 @@ CFIRFilter::CFIRFilter(const float* taps, int tapsLength)
{
m_taps = new float[tapsLength];
m_buffer = new float[tapsLength];
m_tapsLength = tapsLength;
::memcpy(m_taps, taps, tapsLength * sizeof(float));
::memset(m_buffer, 0, tapsLength * sizeof(float));