Skip to content

Commit fba20fe

Browse files
committed
[Ref] Silence cppcheck false-positive.
git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.31@22975 56274372-70c3-4bfc-bfc3-4c3a0b034d27
1 parent 7c44c73 commit fba20fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

soundlib/Sndfile.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,13 +1039,13 @@ void CSoundFile::ResetChannels()
10391039
{
10401040
m_SongFlags.reset(SONG_FADINGSONG | SONG_ENDREACHED);
10411041
m_PlayState.m_nBufferCount = 0;
1042-
for(auto &chn : m_PlayState.Chn)
1042+
for(CHANNELINDEX c = 0; c < static_cast<CHANNELINDEX>(std::size(m_PlayState.Chn)); ++c)
10431043
{
1044+
ModChannel &chn = m_PlayState.Chn[c];
10441045
chn.nROfs = chn.nLOfs = 0;
10451046
chn.nLength = 0;
10461047
if(chn.dwFlags[CHN_ADLIB] && m_opl)
10471048
{
1048-
CHANNELINDEX c = static_cast<CHANNELINDEX>(std::distance(m_PlayState.Chn.data(), &chn));
10491049
m_opl->NoteCut(c);
10501050
}
10511051
}

0 commit comments

Comments
 (0)