1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 09:37:56 +00:00

get rid of 2 more unnecessary sort methods

This commit is contained in:
Mitchell Livingston 2007-11-23 15:48:26 +00:00
parent dc37d150e8
commit ddc97a921b
3 changed files with 3 additions and 15 deletions

View file

@ -1604,7 +1604,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
* progressDescriptor = [[[NSSortDescriptor alloc] initWithKey: * progressDescriptor = [[[NSSortDescriptor alloc] initWithKey:
@"progress" ascending: !asc] autorelease], @"progress" ascending: !asc] autorelease],
* ratioDescriptor = [[[NSSortDescriptor alloc] initWithKey: * ratioDescriptor = [[[NSSortDescriptor alloc] initWithKey:
@"ratioSortKey" ascending: !asc] autorelease]; @"ratio" ascending: !asc] autorelease];
descriptors = [[NSArray alloc] initWithObjects: stateDescriptor, progressDescriptor, ratioDescriptor, descriptors = [[NSArray alloc] initWithObjects: stateDescriptor, progressDescriptor, ratioDescriptor,
nameDescriptor, orderDescriptor, nil]; nameDescriptor, orderDescriptor, nil];
@ -1614,9 +1614,9 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
NSSortDescriptor * progressDescriptor = [[[NSSortDescriptor alloc] initWithKey: NSSortDescriptor * progressDescriptor = [[[NSSortDescriptor alloc] initWithKey:
@"progress" ascending: asc] autorelease], @"progress" ascending: asc] autorelease],
* ratioProgressDescriptor = [[[NSSortDescriptor alloc] initWithKey: * ratioProgressDescriptor = [[[NSSortDescriptor alloc] initWithKey:
@"ratioProgressSortKey" ascending: asc] autorelease], @"progressStopRatio" ascending: asc] autorelease],
* ratioDescriptor = [[[NSSortDescriptor alloc] initWithKey: * ratioDescriptor = [[[NSSortDescriptor alloc] initWithKey:
@"ratioSortKey" ascending: asc] autorelease]; @"ratio" ascending: asc] autorelease];
descriptors = [[NSArray alloc] initWithObjects: progressDescriptor, ratioProgressDescriptor, ratioDescriptor, descriptors = [[NSArray alloc] initWithObjects: progressDescriptor, ratioProgressDescriptor, ratioDescriptor,
nameDescriptor, orderDescriptor, nil]; nameDescriptor, orderDescriptor, nil];

View file

@ -229,8 +229,6 @@ typedef enum
- (BOOL) isStalled; - (BOOL) isStalled;
- (NSNumber *) stateSortKey; - (NSNumber *) stateSortKey;
- (NSNumber *) ratioSortKey;
- (NSNumber *) ratioProgressSortKey;
- (int) torrentID; - (int) torrentID;
- (const tr_info *) torrentInfo; - (const tr_info *) torrentInfo;

View file

@ -1363,16 +1363,6 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
return [NSNumber numberWithInt: 2]; return [NSNumber numberWithInt: 2];
} }
- (NSNumber *) ratioSortKey
{
return [NSNumber numberWithFloat: [self ratio]];
}
- (NSNumber *) ratioProgressSortKey
{
return [NSNumber numberWithFloat: [self progressStopRatio]];
}
- (int) torrentID - (int) torrentID
{ {
return fID; return fID;