Reorder resume data saving conditionals

Having conditionals which can break saving of torrent resume data
in order from more likely to less likely is more effective.
This commit is contained in:
Vladimir Golovnev (Glassez) 2018-08-01 18:25:37 +03:00
parent fea7a96e68
commit 7716a27d0d
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7

View File

@ -2350,9 +2350,9 @@ void Session::generateResumeData(bool final)
{
foreach (TorrentHandle *const torrent, m_torrents) {
if (!torrent->isValid()) continue;
if (torrent->hasMissingFiles()) continue;
if (torrent->isChecking() || torrent->hasError()) continue;
if (torrent->isChecking()) continue;
if (!final && !torrent->needSaveResumeData()) continue;
if (torrent->hasMissingFiles() || torrent->hasError()) continue;
saveTorrentResumeData(torrent, final);
}