mirror of
https://github.com/transmission/transmission
synced 2025-01-30 19:03:04 +00:00
parent
86fd89fff4
commit
be77226d6b
1 changed files with 3 additions and 4 deletions
|
@ -300,10 +300,9 @@ public:
|
|||
|
||||
[[nodiscard]] constexpr auto ratio() const noexcept
|
||||
{
|
||||
auto const u = uploadedEver();
|
||||
auto const d = downloadedEver();
|
||||
auto const t = totalSize();
|
||||
return double(u) / (d ? d : t);
|
||||
auto const numerator = static_cast<double>(uploadedEver());
|
||||
auto const denominator = sizeWhenDone();
|
||||
return denominator > 0U ? numerator / denominator : double{};
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr double percentComplete() const noexcept
|
||||
|
|
Loading…
Reference in a new issue