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:
parent
2d073d9139
commit
c3b81a378c
3 changed files with 4 additions and 4 deletions
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
tr_tracker_stat fStat;
|
||||
}
|
||||
|
||||
- (id) initWithTrackerStat: (tr_tracker_stat) stat;
|
||||
- (id) initWithTrackerStat: (tr_tracker_stat *) stat;
|
||||
|
||||
- (NSString *) host;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue