From 9e2106b5c48e573b3ba3814b66ab2276e40a2eda Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Tue, 6 Jul 2010 03:40:34 +0000 Subject: [PATCH] replace some floats with doubles --- macosx/Badger.m | 4 ++-- macosx/Torrent.m | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/macosx/Badger.m b/macosx/Badger.m index 8465de0f4..ea9210f3b 100644 --- a/macosx/Badger.m +++ b/macosx/Badger.m @@ -55,9 +55,9 @@ - (void) updateBadge { - const float downloadRate = [[NSUserDefaults standardUserDefaults] boolForKey: @"BadgeDownloadRate"] + const double downloadRate = [[NSUserDefaults standardUserDefaults] boolForKey: @"BadgeDownloadRate"] ? tr_sessionGetPieceSpeed_KBps(fLib, TR_DOWN) : 0.0; - const float uploadRate = [[NSUserDefaults standardUserDefaults] boolForKey: @"BadgeUploadRate"] + const double uploadRate = [[NSUserDefaults standardUserDefaults] boolForKey: @"BadgeUploadRate"] ? tr_sessionGetPieceSpeed_KBps(fLib, TR_UP) : 0.0; //only update if the badged values change diff --git a/macosx/Torrent.m b/macosx/Torrent.m index e2a003137..5c60659c7 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -883,9 +883,9 @@ int trashDataFile(const char * filename) [dict setObject: [NSString stringWithUTF8String: peer->flagStr] forKey: @"Flags"]; if (peer->isUploadingTo) - [dict setObject: [NSNumber numberWithFloat: peer->rateToPeer_KBps] forKey: @"UL To Rate"]; + [dict setObject: [NSNumber numberWithDouble: peer->rateToPeer_KBps] forKey: @"UL To Rate"]; if (peer->isDownloadingFrom) - [dict setObject: [NSNumber numberWithFloat: peer->rateToClient_KBps] forKey: @"DL From Rate"]; + [dict setObject: [NSNumber numberWithDouble: peer->rateToClient_KBps] forKey: @"DL From Rate"]; [peerDicts addObject: dict]; }