From 1e667de589161d4f42051f21410dfe7a72ee2355 Mon Sep 17 00:00:00 2001 From: sukibaby <163092272+sukibaby@users.noreply.github.com> Date: Wed, 28 May 2025 02:32:59 -0700 Subject: [PATCH] Use a range-based for loop to avoid manual iterator handling --- src/RageSoundReader_ChannelSplit.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/RageSoundReader_ChannelSplit.cpp b/src/RageSoundReader_ChannelSplit.cpp index ee7925922d..ae190c992c 100644 --- a/src/RageSoundReader_ChannelSplit.cpp +++ b/src/RageSoundReader_ChannelSplit.cpp @@ -162,9 +162,8 @@ int RageSoundReader_Split::Read( float *pBuf, int iFrames ) { RageSoundMixBuffer mix; - for( int i = 0; i < (int) m_aChannels.size(); ++i ) + for( const ChannelMap& chan : m_aChannels ) { - const ChannelMap &chan = m_aChannels[i]; mix.SetWriteOffset( chan.m_iToChannel ); mix.write( pSrc + chan.m_iFromChannel, iFramesAvailable, m_pImpl->m_pSource->GetNumChannels(), m_iNumOutputChannels ); }