Clean up code

* Use compiler generated comparison function
* Use designated initializers
* Convert to proper type
* Use reference
* Remove redundant text
  The `msg` already contain the text `Reason:` so it isn't needed.

PR #20312.
This commit is contained in:
Chocobo1 2024-01-25 02:56:12 +08:00 committed by GitHub
parent bab9c15913
commit 94e80d01a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 42 additions and 58 deletions

View file

@ -754,7 +754,7 @@ void TorrentsController::addAction()
}
}
const DataMap torrents = data();
const DataMap &torrents = data();
for (auto it = torrents.constBegin(); it != torrents.constEnd(); ++it)
{
if (const auto loadResult = BitTorrent::TorrentDescriptor::load(it.value()))