From 363e83ffec05a08313075166e602d4ae78bf10b3 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sun, 24 Oct 2010 18:06:32 +0000 Subject: [PATCH] slight change to the file size formatting function --- macosx/NSStringAdditions.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/macosx/NSStringAdditions.m b/macosx/NSStringAdditions.m index 028c5fec9..918cdbd98 100644 --- a/macosx/NSStringAdditions.m +++ b/macosx/NSStringAdditions.m @@ -49,7 +49,7 @@ + (NSString *) stringForFileSize: (uint64_t) size { const CGFloat baseFloat = [NSApp isOnSnowLeopardOrBetter] ? 1000.0 : 1024.0; - const NSInteger baseInt = [NSApp isOnSnowLeopardOrBetter] ? 1000 : 1024; + const NSUInteger baseInt = [NSApp isOnSnowLeopardOrBetter] ? 1000 : 1024; if (size < baseInt) { @@ -68,17 +68,17 @@ } else if (size < pow(baseInt, 3)) { - convertedSize = size / pow(baseFloat, 2); + convertedSize = size / powf(baseFloat, 2); unit = NSLocalizedString(@"MB", "File size - megabytes"); } else if (size < pow(baseInt, 4)) { - convertedSize = size / pow(baseFloat, 3); + convertedSize = size / powf(baseFloat, 3); unit = NSLocalizedString(@"GB", "File size - gigabytes"); } else { - convertedSize = size / pow(baseFloat, 4); + convertedSize = size / powf(baseFloat, 4); unit = NSLocalizedString(@"TB", "File size - terabytes"); } -- 2.40.0