From a5fb8ef0401d0214d965bbd904a0724028b3738a Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sat, 4 Aug 2007 01:48:34 +0000 Subject: [PATCH] trivial change to getting file size string --- macosx/StringAdditions.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/macosx/StringAdditions.m b/macosx/StringAdditions.m index 7cd205ec5..32021c655 100644 --- a/macosx/StringAdditions.m +++ b/macosx/StringAdditions.m @@ -47,21 +47,21 @@ if (size < 1024) return [NSString stringWithFormat: NSLocalizedString(@"%lld bytes", "File size"), size]; - float convertedSize = (float)size; + float convertedSize; NSString * unit; if (size < 1048576) { - convertedSize /= 1024.0; + convertedSize = size / 1024.0; unit = NSLocalizedString(@" KB", "File size (beware of leading space)"); } else if (size < 1073741824) { - convertedSize /= 1048576.0; + convertedSize = size / 1048576.0; unit = NSLocalizedString(@" MB", "File size (beware of leading space)"); } else { - convertedSize /= 1073741824.0; + convertedSize = size / 1073741824.0; unit = NSLocalizedString(@" GB", "File size (beware of leading space)"); }