Changeset 10255


Ignore:
Timestamp:
Feb 22, 2010, 12:15:27 AM (12 years ago)
Author:
livings124
Message:

avoid unnecessary setting of id when calling tr_torrentSetAnnounceList

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/transmission.h

    r10174 r10255  
    12251225 * @param trackers An array of trackers, sorted by tier from first to last.
    12261226 *                 NOTE: only the `tier' and `announce' fields are used.
    1227  *                 libtransmission derives `scrape' from `announce'.
     1227 *                 libtransmission derives `scrape' from `announce'
     1228 *                  and reassigns 'id'.
    12281229 * @param trackerCount size of the `trackers' array
    12291230 */
  • trunk/macosx/Torrent.m

    r10244 r10255  
    636636    tr_tracker_info * trackerStructs = tr_new(tr_tracker_info, oldTrackerCount+1);
    637637    for (NSUInteger i=0; i < oldTrackerCount; ++i)
    638     {
    639638        trackerStructs[i] = fInfo->trackers[i];
    640         trackerStructs[i].id = i;
    641     }
    642639   
    643640    trackerStructs[oldTrackerCount].announce = (char *)[tracker UTF8String];
     
    660657    {
    661658        if (![removeIdentifiers containsIndex: fInfo->trackers[i].id])
    662         {
    663             trackerStructs[newCount] = fInfo->trackers[i];
    664             trackerStructs[newCount].id = newCount++;
    665         }
     659            trackerStructs[newCount++] = fInfo->trackers[i];
    666660    }
    667661   
Note: See TracChangeset for help on using the changeset viewer.