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:
saker
2022-09-27 04:27:35 -04:00
committed by GitHub
parent e407e73e24
commit 2f7a6558a1
67 changed files with 441 additions and 598 deletions

View File

@@ -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" );
}