Changeset 4144


Ignore:
Timestamp:
Dec 13, 2007, 4:39:07 AM (14 years ago)
Author:
livings124
Message:

remove some error checks that will never be executed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/NSStringAdditions.m

    r4143 r4144  
    7272+ (NSString *) stringForSpeed: (float) speed
    7373{
    74     if (speed < 0)
    75         return NSLocalizedString(@"error", "Transfer speed invalid");
    76    
    77     return [[self stringForSpeedAbbrev: speed] stringByAppendingString:
    78                     NSLocalizedString(@"B/s", "Transfer speed (Bytes per second)")];
     74    return [[self stringForSpeedAbbrev: speed] stringByAppendingString: NSLocalizedString(@"B/s", "Transfer speed (Bytes per second)")];
    7975}
    8076
    8177+ (NSString *) stringForSpeedAbbrev: (float) speed
    8278{
    83     if (speed < 0)
    84         return NSLocalizedString(@"error", "Transfer speed invalid");
    85    
    8679    if (speed < 1000.0) //0.0 K to 999.9 K
    8780        return [NSString stringWithFormat: @"%.1f K", speed];
     
    10093    else if (ratio == TR_RATIO_INF)
    10194        return [NSString stringWithUTF8String: "\xE2\x88\x9E"];
    102     else if (ratio < 0)
    103         return NSLocalizedString(@"error", "Ratio invalid");
    10495    else;
    10596   
Note: See TracChangeset for help on using the changeset viewer.