Move increment out of loop

This commit is contained in:
Chocobo1 2022-11-06 15:10:23 +08:00 committed by sledgehammer999
commit e62f9ef56a
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2

View file

@ -2916,10 +2916,8 @@ void SessionImpl::saveResumeData()
saveTorrentsQueue();
for (const TorrentImpl *torrent : asConst(m_torrents))
{
torrent->nativeHandle().save_resume_data(lt::torrent_handle::only_if_modified);
++m_numResumeData;
}
m_numResumeData += m_torrents.size();
QElapsedTimer timer;
timer.start();