mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-13 03:27:06 -04:00
clang-tidy: Apply modernize-loop-convert everywhere (#6481)
Co-authored-by: allejok96 <allejok96@gmail.com> Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
This commit is contained in:
@@ -66,11 +66,11 @@ Effect::Effect( const Plugin::Descriptor * _desc,
|
||||
|
||||
Effect::~Effect()
|
||||
{
|
||||
for( int i = 0; i < 2; ++i )
|
||||
for (const auto& state : m_srcState)
|
||||
{
|
||||
if( m_srcState[i] != nullptr )
|
||||
if (state != nullptr)
|
||||
{
|
||||
src_delete( m_srcState[i] );
|
||||
src_delete(state);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -175,17 +175,15 @@ gui::PluginView * Effect::instantiateView( QWidget * _parent )
|
||||
|
||||
void Effect::reinitSRC()
|
||||
{
|
||||
for( int i = 0; i < 2; ++i )
|
||||
for (auto& state : m_srcState)
|
||||
{
|
||||
if( m_srcState[i] != nullptr )
|
||||
if (state != nullptr)
|
||||
{
|
||||
src_delete( m_srcState[i] );
|
||||
src_delete(state);
|
||||
}
|
||||
int error;
|
||||
if( ( m_srcState[i] = src_new(
|
||||
Engine::audioEngine()->currentQualitySettings().
|
||||
libsrcInterpolation(),
|
||||
DEFAULT_CHANNELS, &error ) ) == nullptr )
|
||||
const int currentInterpolation = Engine::audioEngine()->currentQualitySettings().libsrcInterpolation();
|
||||
if((state = src_new(currentInterpolation, DEFAULT_CHANNELS, &error)) == nullptr)
|
||||
{
|
||||
qFatal( "Error: src_new() failed in effect.cpp!\n" );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user