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/Torrent.m

    r7508 r7514  
    17451745            {
    17461746                //determine if folder node already exists
    1747                 NSEnumerator * enumerator = [fileList objectEnumerator];
    1748                 FileListNode * node;
    1749                 while ((node = [enumerator nextObject]))
     1747                FileListNode * node = nil;
     1748                for (node in fileList)
    17501749                    if ([[node name] isEqualToString: name] && [node isFolder])
    17511750                        break;
     
    17961795    if (isFolder)
    17971796    {
    1798         NSEnumerator * enumerator = [[parent children] objectEnumerator];
    1799         while ((node = [enumerator nextObject]))
     1797        for (node in [parent children])
    18001798            if ([[node name] isEqualToString: name] && [node isFolder])
    18011799                break;
     
    19451943    //get count
    19461944    NSInteger count = 0;
    1947     NSEnumerator * enumerator = [trackers objectEnumerator];
    1948     id object;
    1949     while ((object = [enumerator nextObject]))
     1945    for (id object in trackers)
    19501946        if (![object isKindOfClass: [NSNumber class]])
    19511947            count++;
     
    19541950    tr_tracker_info * trackerStructs = tr_new(tr_tracker_info, count);
    19551951    NSInteger tier = 0, i = 0;
    1956     enumerator = [trackers objectEnumerator];
    1957     while ((object = [enumerator nextObject]))
     1952    for (id object in trackers)
    19581953    {
    19591954        if (![object isKindOfClass: [NSNumber class]])
Note: See TracChangeset for help on using the changeset viewer.