remove some error checks that will never be executed

This commit is contained in:
Mitchell Livingston 2007-12-13 04:39:07 +00:00
parent 1b6a8a9504
commit 164dca0e04
1 changed files with 1 additions and 10 deletions

View File

@ -71,18 +71,11 @@
+ (NSString *) stringForSpeed: (float) speed
{
if (speed < 0)
return NSLocalizedString(@"error", "Transfer speed invalid");
return [[self stringForSpeedAbbrev: speed] stringByAppendingString:
NSLocalizedString(@"B/s", "Transfer speed (Bytes per second)")];
return [[self stringForSpeedAbbrev: speed] stringByAppendingString: NSLocalizedString(@"B/s", "Transfer speed (Bytes per second)")];
}
+ (NSString *) stringForSpeedAbbrev: (float) speed
{
if (speed < 0)
return NSLocalizedString(@"error", "Transfer speed invalid");
if (speed < 1000.0) //0.0 K to 999.9 K
return [NSString stringWithFormat: @"%.1f K", speed];
else if (speed < 102400.0) //0.98 M to 99.99 M
@ -99,8 +92,6 @@
return NSLocalizedString(@"N/A", "No Ratio");
else if (ratio == TR_RATIO_INF)
return [NSString stringWithUTF8String: "\xE2\x88\x9E"];
else if (ratio < 0)
return NSLocalizedString(@"error", "Ratio invalid");
else;
if (ratio < 10.0)