remove some error checks that will never be executed
This commit is contained in:
parent
1b6a8a9504
commit
164dca0e04
|
@ -71,18 +71,11 @@
|
||||||
|
|
||||||
+ (NSString *) stringForSpeed: (float) speed
|
+ (NSString *) stringForSpeed: (float) speed
|
||||||
{
|
{
|
||||||
if (speed < 0)
|
return [[self stringForSpeedAbbrev: speed] stringByAppendingString: NSLocalizedString(@"B/s", "Transfer speed (Bytes per second)")];
|
||||||
return NSLocalizedString(@"error", "Transfer speed invalid");
|
|
||||||
|
|
||||||
return [[self stringForSpeedAbbrev: speed] stringByAppendingString:
|
|
||||||
NSLocalizedString(@"B/s", "Transfer speed (Bytes per second)")];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (NSString *) stringForSpeedAbbrev: (float) speed
|
+ (NSString *) stringForSpeedAbbrev: (float) speed
|
||||||
{
|
{
|
||||||
if (speed < 0)
|
|
||||||
return NSLocalizedString(@"error", "Transfer speed invalid");
|
|
||||||
|
|
||||||
if (speed < 1000.0) //0.0 K to 999.9 K
|
if (speed < 1000.0) //0.0 K to 999.9 K
|
||||||
return [NSString stringWithFormat: @"%.1f K", speed];
|
return [NSString stringWithFormat: @"%.1f K", speed];
|
||||||
else if (speed < 102400.0) //0.98 M to 99.99 M
|
else if (speed < 102400.0) //0.98 M to 99.99 M
|
||||||
|
@ -99,8 +92,6 @@
|
||||||
return NSLocalizedString(@"N/A", "No Ratio");
|
return NSLocalizedString(@"N/A", "No Ratio");
|
||||||
else if (ratio == TR_RATIO_INF)
|
else if (ratio == TR_RATIO_INF)
|
||||||
return [NSString stringWithUTF8String: "\xE2\x88\x9E"];
|
return [NSString stringWithUTF8String: "\xE2\x88\x9E"];
|
||||||
else if (ratio < 0)
|
|
||||||
return NSLocalizedString(@"error", "Ratio invalid");
|
|
||||||
else;
|
else;
|
||||||
|
|
||||||
if (ratio < 10.0)
|
if (ratio < 10.0)
|
||||||
|
|
Loading…
Reference in New Issue