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

@ -107,7 +107,8 @@ void TrackerEntry::setTier(const int value)
int TrackerEntry::numSeeds() const
{
int value = -1;
for (const lt::announce_endpoint &endpoint : nativeEntry().endpoints) {
for (const lt::announce_endpoint &endpoint : nativeEntry().endpoints)
{
#if (LIBTORRENT_VERSION_NUM >= 20000)
for (const lt::announce_infohash &infoHash : endpoint.info_hashes)
value = std::max(value, infoHash.scrape_complete);
@ -121,7 +122,8 @@ int TrackerEntry::numSeeds() const
int TrackerEntry::numLeeches() const
{
int value = -1;
for (const lt::announce_endpoint &endpoint : nativeEntry().endpoints) {
for (const lt::announce_endpoint &endpoint : nativeEntry().endpoints)
{
#if (LIBTORRENT_VERSION_NUM >= 20000)
for (const lt::announce_infohash &infoHash : endpoint.info_hashes)
value = std::max(value, infoHash.scrape_incomplete);
@ -135,7 +137,8 @@ int TrackerEntry::numLeeches() const
int TrackerEntry::numDownloaded() const
{
int value = -1;
for (const lt::announce_endpoint &endpoint : nativeEntry().endpoints) {
for (const lt::announce_endpoint &endpoint : nativeEntry().endpoints)
{
#if (LIBTORRENT_VERSION_NUM >= 20000)
for (const lt::announce_infohash &infoHash : endpoint.info_hashes)
value = std::max(value, infoHash.scrape_downloaded);