Changeset 11648


Ignore:
Timestamp:
Jan 8, 2011, 5:19:17 PM (11 years ago)
Author:
livings124
Message:

use a float instead of a double for file unit size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/NSStringAdditions.m

    r11647 r11648  
    180180    unitsUsed: (NSString **) unitUsed
    181181{
    182     const double baseFloat = [NSApp isOnSnowLeopardOrBetter] ? 1000.0 : 1024.0;
     182    const float baseFloat = [NSApp isOnSnowLeopardOrBetter] ? 1000.0 : 1024.0;
    183183    const NSUInteger baseInt = [NSApp isOnSnowLeopardOrBetter] ? 1000 : 1024;
    184184   
     
    217217    [numberFormatter setMaximumFractionDigits: decimals];
    218218   
    219     NSString * fileSizeString = [numberFormatter stringFromNumber: [NSNumber numberWithDouble: convertedSize]];
     219    NSString * fileSizeString = [numberFormatter stringFromNumber: [NSNumber numberWithFloat: convertedSize]];
    220220   
    221221    if (!notAllowedUnit || ![unit isEqualToString: notAllowedUnit])
Note: See TracChangeset for help on using the changeset viewer.