mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 18:56:08 +03:00
Fix wrong logic
The error is caused by silly copy-paste error.
Fixup 09ff735007
.
This commit is contained in:
parent
485fdf910e
commit
1b0ffd7781
1 changed files with 9 additions and 12 deletions
|
@ -116,11 +116,10 @@ int TrackerEntry::numSeeds() const
|
||||||
#if (LIBTORRENT_VERSION_NUM < 10200)
|
#if (LIBTORRENT_VERSION_NUM < 10200)
|
||||||
return nativeEntry().scrape_complete;
|
return nativeEntry().scrape_complete;
|
||||||
#else
|
#else
|
||||||
int max = -1;
|
int value = -1;
|
||||||
return nativeEntry().endpoints.empty() ? -1 : nativeEntry().endpoints[0].scrape_incomplete;
|
|
||||||
for (const lt::announce_endpoint &endpoint : nativeEntry().endpoints)
|
for (const lt::announce_endpoint &endpoint : nativeEntry().endpoints)
|
||||||
max = std::max(max, endpoint.scrape_complete);
|
value = std::max(value, endpoint.scrape_complete);
|
||||||
return max;
|
return value;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,11 +128,10 @@ int TrackerEntry::numLeeches() const
|
||||||
#if (LIBTORRENT_VERSION_NUM < 10200)
|
#if (LIBTORRENT_VERSION_NUM < 10200)
|
||||||
return nativeEntry().scrape_incomplete;
|
return nativeEntry().scrape_incomplete;
|
||||||
#else
|
#else
|
||||||
int max = -1;
|
int value = -1;
|
||||||
return nativeEntry().endpoints.empty() ? -1 : nativeEntry().endpoints[0].scrape_incomplete;
|
|
||||||
for (const lt::announce_endpoint &endpoint : nativeEntry().endpoints)
|
for (const lt::announce_endpoint &endpoint : nativeEntry().endpoints)
|
||||||
max = std::max(max, endpoint.scrape_incomplete);
|
value = std::max(value, endpoint.scrape_incomplete);
|
||||||
return max;
|
return value;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,11 +140,10 @@ int TrackerEntry::numDownloaded() const
|
||||||
#if (LIBTORRENT_VERSION_NUM < 10200)
|
#if (LIBTORRENT_VERSION_NUM < 10200)
|
||||||
return nativeEntry().scrape_downloaded;
|
return nativeEntry().scrape_downloaded;
|
||||||
#else
|
#else
|
||||||
int max = -1;
|
int value = -1;
|
||||||
return nativeEntry().endpoints.empty() ? -1 : nativeEntry().endpoints[0].scrape_incomplete;
|
|
||||||
for (const lt::announce_endpoint &endpoint : nativeEntry().endpoints)
|
for (const lt::announce_endpoint &endpoint : nativeEntry().endpoints)
|
||||||
max = std::max(max, endpoint.scrape_downloaded);
|
value = std::max(value, endpoint.scrape_downloaded);
|
||||||
return max;
|
return value;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue