Improve coding style

This commit is contained in:
Vladimir Golovnev (Glassez) 2020-11-16 10:02:11 +03:00
parent acad35c5bc
commit c41df9ffbd
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
147 changed files with 4454 additions and 2227 deletions

View file

@ -63,7 +63,8 @@ void TrackerEntriesDialog::setTrackers(const QVector<BitTorrent::TrackerEntry> &
int maxTier = -1;
QHash<int, QString> tiers; // <tier, tracker URLs>
for (const BitTorrent::TrackerEntry &entry : trackers) {
for (const BitTorrent::TrackerEntry &entry : trackers)
{
tiers[entry.tier()] += (entry.url() + '\n');
maxTier = std::max(maxTier, entry.tier());
}
@ -85,10 +86,12 @@ QVector<BitTorrent::TrackerEntry> TrackerEntriesDialog::trackers() const
entries.reserve(lines.size());
int tier = 0;
for (QStringRef line : lines) {
for (QStringRef line : lines)
{
line = line.trimmed();
if (line.isEmpty()) {
if (line.isEmpty())
{
++tier;
continue;
}