mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-14 12:08:33 -04:00
Replace more instances new/delete with owning types (#4245)
* Use owning types when possible. Note: the QByteArray s is detached to mimic previous behavior; detach() guarantees that the QByteArray uniquely owns its data, since otherwise it's COW. This may be relevant in case Plugin:instantiate modifies s.data() -- this way the original QString is safe. * Make m_filter a unique_ptr. * Make m_activeRenderer a unique_ptr * use std::string instead of strcpy + buffers
This commit is contained in:
@@ -161,9 +161,9 @@ void InstrumentSoundShaping::processAudioBuffer( sampleFrame* buffer,
|
||||
int old_filter_cut = 0;
|
||||
int old_filter_res = 0;
|
||||
|
||||
if( n->m_filter == NULL )
|
||||
if( n->m_filter == nullptr )
|
||||
{
|
||||
n->m_filter = new BasicFilters<>( Engine::mixer()->processingSampleRate() );
|
||||
n->m_filter = make_unique<BasicFilters<>>( Engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
n->m_filter->setFilterType( m_filterModel.value() );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user