mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
get rid of another warning
This commit is contained in:
@@ -1681,10 +1681,12 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
||||
{
|
||||
NSSortDescriptor * progressDescriptor = [[[NSSortDescriptor alloc] initWithKey:
|
||||
@"progressSortKey" ascending: asc] autorelease],
|
||||
* ratioProgressDescriptor = [[[NSSortDescriptor alloc] initWithKey:
|
||||
@"ratioProgressSortKey" ascending: asc] autorelease],
|
||||
* ratioDescriptor = [[[NSSortDescriptor alloc] initWithKey:
|
||||
@"ratioSortKey" ascending: asc] autorelease];
|
||||
|
||||
descriptors = [[NSArray alloc] initWithObjects: progressDescriptor, ratioDescriptor,
|
||||
descriptors = [[NSArray alloc] initWithObjects: progressDescriptor, ratioProgressDescriptor, ratioDescriptor,
|
||||
nameDescriptor, orderDescriptor, nil];
|
||||
}
|
||||
else if ([sortType isEqualToString: SORT_TRACKER])
|
||||
|
||||
@@ -225,6 +225,7 @@ typedef enum
|
||||
- (NSNumber *) stateSortKey;
|
||||
- (NSNumber *) progressSortKey;
|
||||
- (NSNumber *) ratioSortKey;
|
||||
- (NSNumber *) ratioProgressSortKey;
|
||||
|
||||
- (int) torrentID;
|
||||
- (const tr_info *) torrentInfo;
|
||||
|
||||
@@ -1375,14 +1375,9 @@ static int static_lastid = 0;
|
||||
return [NSNumber numberWithInt: 2];
|
||||
}
|
||||
|
||||
#warning is progress different when seeding?
|
||||
- (NSNumber *) progressSortKey
|
||||
{
|
||||
float progress;
|
||||
if ((progress = [self progress]) >= 1.0)
|
||||
progress += [self progressStopRatio];
|
||||
|
||||
return [NSNumber numberWithFloat: progress];
|
||||
return [NSNumber numberWithFloat: [self progress]];
|
||||
}
|
||||
|
||||
- (NSNumber *) ratioSortKey
|
||||
@@ -1390,6 +1385,11 @@ static int static_lastid = 0;
|
||||
return [NSNumber numberWithFloat: [self ratio]];
|
||||
}
|
||||
|
||||
- (NSNumber *) ratioProgressSortKey
|
||||
{
|
||||
return [NSNumber numberWithFloat: [self progressStopRatio]];
|
||||
}
|
||||
|
||||
- (int) torrentID
|
||||
{
|
||||
return fID;
|
||||
|
||||
Reference in New Issue
Block a user