mirror of
https://github.com/transmission/transmission
synced 2024-12-23 00:04:06 +00:00
refactor: do not reimplement tr_getRatio() in transmission-remote (#4257)
This commit is contained in:
parent
49393daf01
commit
d8327949ac
1 changed files with 1 additions and 16 deletions
|
@ -175,22 +175,7 @@ static std::string strlratio2(double ratio)
|
|||
|
||||
static std::string strlratio(int64_t numerator, int64_t denominator)
|
||||
{
|
||||
double ratio;
|
||||
|
||||
if (denominator != 0)
|
||||
{
|
||||
ratio = numerator / (double)denominator;
|
||||
}
|
||||
else if (numerator != 0)
|
||||
{
|
||||
ratio = TR_RATIO_INF;
|
||||
}
|
||||
else
|
||||
{
|
||||
ratio = TR_RATIO_NA;
|
||||
}
|
||||
|
||||
return strlratio2(ratio);
|
||||
return strlratio2(tr_getRatio(numerator, denominator));
|
||||
}
|
||||
|
||||
static std::string strlmem(int64_t bytes)
|
||||
|
|
Loading…
Reference in a new issue