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
7 changed files with 42 additions and 58 deletions

View File

@@ -69,9 +69,9 @@ namespace BitTorrent
int seedingTimeLimit = Torrent::USE_GLOBAL_SEEDING_TIME;
int inactiveSeedingTimeLimit = Torrent::USE_GLOBAL_INACTIVE_SEEDING_TIME;
qreal ratioLimit = Torrent::USE_GLOBAL_RATIO;
};
bool operator==(const AddTorrentParams &lhs, const AddTorrentParams &rhs);
friend bool operator==(const AddTorrentParams &lhs, const AddTorrentParams &rhs) = default;
};
AddTorrentParams parseAddTorrentParams(const QJsonObject &jsonObj);
QJsonObject serializeAddTorrentParams(const AddTorrentParams &params);