1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 17:17:31 +00:00

replace some floats with doubles

This commit is contained in:
Mitchell Livingston 2010-07-06 03:40:34 +00:00
parent ed74e0009b
commit 9e2106b5c4
2 changed files with 4 additions and 4 deletions

View file

@ -55,9 +55,9 @@
- (void) updateBadge - (void) updateBadge
{ {
const float downloadRate = [[NSUserDefaults standardUserDefaults] boolForKey: @"BadgeDownloadRate"] const double downloadRate = [[NSUserDefaults standardUserDefaults] boolForKey: @"BadgeDownloadRate"]
? tr_sessionGetPieceSpeed_KBps(fLib, TR_DOWN) : 0.0; ? 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; ? tr_sessionGetPieceSpeed_KBps(fLib, TR_UP) : 0.0;
//only update if the badged values change //only update if the badged values change

View file

@ -883,9 +883,9 @@ int trashDataFile(const char * filename)
[dict setObject: [NSString stringWithUTF8String: peer->flagStr] forKey: @"Flags"]; [dict setObject: [NSString stringWithUTF8String: peer->flagStr] forKey: @"Flags"];
if (peer->isUploadingTo) 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) 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]; [peerDicts addObject: dict];
} }