Use unique pointers for parameter components

This commit is contained in:
xenakios 2018-02-19 20:47:32 +02:00
parent 0f1742fbbf
commit f2d0d3617a
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor(Pau
if (parid->paramID.startsWith("fftsize") || parid->paramID.startsWith("numoutchans") if (parid->paramID.startsWith("fftsize") || parid->paramID.startsWith("numoutchans")
|| parid->paramID.startsWith("numinchans")) || parid->paramID.startsWith("numinchans"))
notifyonlyonrelease = true; notifyonlyonrelease = true;
m_parcomps.push_back(std::make_shared<ParameterComponent>(pars[i],notifyonlyonrelease)); m_parcomps.emplace_back(std::make_unique<ParameterComponent>(pars[i],notifyonlyonrelease));
int group_id = -1; int group_id = -1;
if (i == cpi_harmonicsbw || i == cpi_harmonicsfreq || i == cpi_harmonicsgauss || i == cpi_numharmonics) if (i == cpi_harmonicsbw || i == cpi_harmonicsfreq || i == cpi_harmonicsgauss || i == cpi_numharmonics)
group_id = 0; group_id = 0;

View File

@ -207,7 +207,7 @@ public:
WaveformComponent m_wavecomponent; WaveformComponent m_wavecomponent;
private: private:
PaulstretchpluginAudioProcessor& processor; PaulstretchpluginAudioProcessor& processor;
std::vector<std::shared_ptr<ParameterComponent>> m_parcomps; std::vector<std::unique_ptr<ParameterComponent>> m_parcomps;
//SpectralVisualizer m_specvis; //SpectralVisualizer m_specvis;
PerfMeterComponent m_perfmeter; PerfMeterComponent m_perfmeter;
TextButton m_import_button; TextButton m_import_button;