Ignore:
Timestamp:
Dec 26, 2008, 7:25:17 AM (12 years ago)
Author:
livings124
Message:

eliminate some more enumerator objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/TorrentGroup.m

    r7200 r7514  
    5858{
    5959    uint64_t uploaded = 0, downloaded = 0;
    60     NSEnumerator * enumerator = [fTorrents objectEnumerator];
    61     Torrent * torrent;
    62     while ((torrent = [enumerator nextObject]))
     60    for (Torrent * torrent in fTorrents)
    6361    {
    6462        uploaded += [torrent uploadedTotal];
     
    7270{
    7371    CGFloat rate = 0.0f;
    74     NSEnumerator * enumerator = [fTorrents objectEnumerator];
    75     Torrent * torrent;
    76     while ((torrent = [enumerator nextObject]))
     72    for (Torrent * torrent in fTorrents)
    7773        rate += [torrent uploadRate];
    7874   
     
    8379{
    8480    CGFloat rate = 0.0f;
    85     NSEnumerator * enumerator = [fTorrents objectEnumerator];
    86     Torrent * torrent;
    87     while ((torrent = [enumerator nextObject]))
     81    for (Torrent * torrent in fTorrents)
    8882        rate += [torrent downloadRate];
    8983   
Note: See TracChangeset for help on using the changeset viewer.