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

let's copy the tracker stat object only once instead of twice on each pulse

This commit is contained in:
Mitchell Livingston 2009-09-26 16:46:14 +00:00
parent 2d073d9139
commit c3b81a378c
3 changed files with 4 additions and 4 deletions

View file

@ -756,7 +756,7 @@ int trashDataFile(const char * filename)
prevTier = stats[i].tier;
}
TrackerNode * tracker = [[TrackerNode alloc] initWithTrackerStat: stats[i]];
TrackerNode * tracker = [[TrackerNode alloc] initWithTrackerStat: &stats[i]];
[trackers addObject: tracker];
[tracker release];
}

View file

@ -30,7 +30,7 @@
tr_tracker_stat fStat;
}
- (id) initWithTrackerStat: (tr_tracker_stat) stat;
- (id) initWithTrackerStat: (tr_tracker_stat *) stat;
- (NSString *) host;

View file

@ -26,11 +26,11 @@
@implementation TrackerNode
- (id) initWithTrackerStat: (tr_tracker_stat) stat
- (id) initWithTrackerStat: (tr_tracker_stat *) stat
{
if ((self = [super init]))
{
fStat = stat;
fStat = *stat;
}
return self;