From 5de0035adb28d3367e10b66347f4122cd863d6ac Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 27 Mar 2020 15:51:34 -0400 Subject: [PATCH] EffectDelay: Make use of std::make_unique Same behavior, but without the need for raw new or separately memsetting. --- lib/EffectDelay.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/EffectDelay.cpp b/lib/EffectDelay.cpp index 1975763..ee529fe 100644 --- a/lib/EffectDelay.cpp +++ b/lib/EffectDelay.cpp @@ -50,8 +50,7 @@ void EffectDelayImp::_update() { x18_currentFeedback[i] = x48_feedback[i] * 128 / 100; x24_currentOutput[i] = x54_output[i] * 128 / 100; - x30_chanLines[i].reset(new T[m_blockSamples * x0_currentSize[i]]); - memset(x30_chanLines[i].get(), 0, m_blockSamples * x0_currentSize[i] * sizeof(T)); + x30_chanLines[i] = std::make_unique(m_blockSamples * x0_currentSize[i]); } m_dirty = false;