Changeset 6887


Ignore:
Timestamp:
Oct 12, 2008, 9:38:13 PM (13 years ago)
Author:
livings124
Message:

move a lot of loop counters into the loops' scopes; trivial changes

Location:
trunk/macosx
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/AddWindowController.m

    r5973 r6887  
    290290    NSMenu * menu = [fGroupPopUp menu];
    291291   
    292     int i;
    293     for (i = [menu numberOfItems]-1 - 2; i >= 0; i--)
     292    for (NSInteger i = [menu numberOfItems]-1 - 2; i >= 0; i--)
    294293        [menu removeItemAtIndex: i];
    295294       
  • trunk/macosx/Controller.m

    r6884 r6887  
    635635    if ([directObject descriptorType] == typeAEList)
    636636    {
    637         unsigned i;
    638         for (i = 1; i <= [directObject numberOfItems]; i++)
     637        for (NSUInteger i = 1; i <= [directObject numberOfItems]; i++)
    639638            if ((urlString = [[directObject descriptorAtIndex: i] stringValue]))
    640639                break;
     
    12841283    if (lowestOrderValue < [fTorrents count])
    12851284    {
    1286         int i;
    1287         for (i = lowestOrderValue; i < [fTorrents count]; i++)
     1285        for (int i = lowestOrderValue; i < [fTorrents count]; i++)
    12881286            [[fTorrents objectAtIndex: i] setOrderValue: i];
    12891287    }
     
    19621960    NSEnumerator * enumerator = [fTorrents objectEnumerator];
    19631961    Torrent * torrent;
    1964     int i = -1;
     1962    int index = -1;
    19651963    while ((torrent = [enumerator nextObject]))
    19661964    {
    1967         i++;
     1965        index++;
    19681966       
    19691967        //check status
     
    20302028        }
    20312029       
    2032         [indexes addIndex: i];
     2030        [indexes addIndex: index];
    20332031    }
    20342032   
     
    20582056       
    20592057        NSMutableArray * groupTorrents;
    2060         int oldGroupValue = -2;
    2061         for (i = 0; i < [allTorrents count]; i++)
     2058        for (int i = 0, oldGroupValue = -2; i < [allTorrents count]; i++)
    20622059        {
    20632060            torrent = [allTorrents objectAtIndex: i];
     
    22302227    if (menu == fGroupsSetMenu || menu == fGroupsSetContextMenu)
    22312228    {
    2232         int i;
    2233         for (i = [menu numberOfItems]-1 - 2; i >= 0; i--)
     2229        for (int i = [menu numberOfItems]-1 - 2; i >= 0; i--)
    22342230            [menu removeItemAtIndex: i];
    22352231       
     
    22402236    else if (menu == fGroupFilterMenu)
    22412237    {
    2242         int i;
    2243         for (i = [menu numberOfItems]-1; i >= 3; i--)
     2238        for (int i = [menu numberOfItems]-1; i >= 3; i--)
    22442239            [menu removeItemAtIndex: i];
    22452240       
     
    22572252       
    22582253        NSMenuItem * item;
    2259         int i;
    2260         for (i = 0; speedLimitActionValue[i] != -1; i++)
     2254        for (int i = 0; speedLimitActionValue[i] != -1; i++)
    22612255        {
    22622256            item = [[NSMenuItem alloc] initWithTitle: [NSString stringWithFormat: NSLocalizedString(@"%d KB/s",
     
    22772271       
    22782272        NSMenuItem * item;
    2279         int i;
    2280         for (i = 0; ratioLimitActionValue[i] != -1; i++)
     2273        for (int i = 0; ratioLimitActionValue[i] != -1; i++)
    22812274        {
    22822275            item = [[NSMenuItem alloc] initWithTitle: [NSString localizedStringWithFormat: @"%.2f", ratioLimitActionValue[i]]
     
    25462539   
    25472540    NSString * file;
    2548     int i;
    2549     for (i = [newNames count] - 1; i >= 0; i--)
     2541    for (int i = [newNames count] - 1; i >= 0; i--)
    25502542    {
    25512543        file = [newNames objectAtIndex: i];
     
    27512743        //get the torrents to move
    27522744        NSMutableArray * movingTorrents = [NSMutableArray arrayWithCapacity: [indexes count]];
    2753         int i;
    2754         for (i = [indexes firstIndex]; i != NSNotFound; i = [indexes indexGreaterThanIndex: i])
     2745        for (int i = [indexes firstIndex]; i != NSNotFound; i = [indexes indexGreaterThanIndex: i])
    27552746            [movingTorrents addObject: [fTableView itemAtRow: i]];
    27562747       
     
    27802771            NSArray * groupTorrents = item ? [item torrents] : fDisplayedTorrents;
    27812772            Torrent * topTorrent = nil;
    2782             for (i = newRow-1; i >= 0; i--)
     2773            for (int i = newRow-1; i >= 0; i--)
    27832774            {
    27842775                Torrent * tempTorrent = [groupTorrents objectAtIndex: i];
     
    27992790           
    28002791            //redo order values
    2801             for (i = 0; i < [fTorrents count]; i++)
     2792            for (int i = 0; i < [fTorrents count]; i++)
    28022793                [[fTorrents objectAtIndex: i] setOrderValue: i];
    28032794        }
     
    41724163        NSRange visibleRows = [fTableView rowsInRect: [fTableView bounds]];
    41734164       
    4174         int row;
    4175         for (row = 0; row < NSMaxRange(visibleRows); row++)
     4165        for (int row = 0; row < NSMaxRange(visibleRows); row++)
    41764166        {
    41774167            id item = [fTableView itemAtRow: row];
  • trunk/macosx/FileOutlineController.m

    r5904 r6887  
    226226    NSIndexSet * indexSet = [fOutline selectedRowIndexes];
    227227    NSMutableIndexSet * itemIndexes = [NSMutableIndexSet indexSet];
    228     int i;
    229     for (i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
     228    for (NSInteger i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
    230229        [itemIndexes addIndexes: [[fOutline itemAtRow: i] indexes]];
    231230   
     
    238237    NSIndexSet * indexSet = [fOutline selectedRowIndexes];
    239238    NSMutableIndexSet * itemIndexes = [NSMutableIndexSet indexSet];
    240     int i;
    241     for (i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
     239    for (NSInteger i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
    242240        [itemIndexes addIndexes: [[fOutline itemAtRow: i] indexes]];
    243241   
     
    268266    NSIndexSet * indexSet = [fOutline selectedRowIndexes];
    269267    NSMutableIndexSet * itemIndexes = [NSMutableIndexSet indexSet];
    270     int i;
    271     for (i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
     268    for (NSInteger i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
    272269        [itemIndexes addIndexes: [[fOutline itemAtRow: i] indexes]];
    273270   
     
    280277    NSString * folder = [fTorrent downloadFolder];
    281278    NSIndexSet * indexes = [fOutline selectedRowIndexes];
    282     int i;
    283     for (i = [indexes firstIndex]; i != NSNotFound; i = [indexes indexGreaterThanIndex: i])
     279    for (NSInteger i = [indexes firstIndex]; i != NSNotFound; i = [indexes indexGreaterThanIndex: i])
    284280        [[NSWorkspace sharedWorkspace] selectFile: [folder stringByAppendingPathComponent:
    285281            [[fOutline itemAtRow: i] fullPath]] inFileViewerRootedAtPath: nil];
     
    298294        NSString * downloadFolder = [fTorrent downloadFolder];
    299295        NSIndexSet * indexSet = [fOutline selectedRowIndexes];
    300         int i;
    301         for (i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
     296        for (NSInteger i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
    302297            if ([[NSFileManager defaultManager] fileExistsAtPath:
    303298                    [downloadFolder stringByAppendingPathComponent: [[[fTorrent fileList] objectAtIndex: i] fullPath]]])
     
    313308        NSIndexSet * indexSet = [fOutline selectedRowIndexes];
    314309        NSMutableIndexSet * itemIndexes = [NSMutableIndexSet indexSet];
    315         int i, state = ([menuItem tag] == FILE_CHECK_TAG) ? NSOnState : NSOffState;
    316         for (i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
     310        for (NSInteger i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
    317311            [itemIndexes addIndexes: [[fOutline itemAtRow: i] indexes]];
    318312       
     313        NSInteger state = ([menuItem tag] == FILE_CHECK_TAG) ? NSOnState : NSOffState;
    319314        return [fTorrent checkForFiles: itemIndexes] != state && [fTorrent canChangeDownloadCheckForFiles: itemIndexes];
    320315    }
     
    327322        NSIndexSet * indexSet = [fOutline selectedRowIndexes];
    328323        NSMutableIndexSet * itemIndexes = [NSMutableIndexSet indexSet];
    329         int i;
    330         for (i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
     324        for (NSInteger i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
    331325            [itemIndexes addIndexes: [[fOutline itemAtRow: i] indexes]];
    332326           
     
    344338        //determine which priorities are checked
    345339        NSIndexSet * indexSet = [fOutline selectedRowIndexes];
    346         BOOL current = NO, other = NO;
    347         int i, priority;
    348        
     340        NSInteger priority;
    349341        switch ([menuItem tag])
    350342        {
     
    359351        }
    360352       
     353        BOOL current = NO, canChange = NO;
    361354        NSIndexSet * fileIndexSet;
    362         for (i = [indexSet firstIndex]; i != NSNotFound && (!current || !other); i = [indexSet indexGreaterThanIndex: i])
     355        for (NSInteger i = [indexSet firstIndex]; i != NSNotFound && !current; i = [indexSet indexGreaterThanIndex: i])
    363356        {
    364357            fileIndexSet = [[fOutline itemAtRow: i] indexes];
    365358            if (![fTorrent canChangeDownloadCheckForFiles: fileIndexSet])
    366359                continue;
    367             else if ([fTorrent hasFilePriority: priority forIndexes: fileIndexSet])
     360           
     361            canChange = YES;
     362            if ([fTorrent hasFilePriority: priority forIndexes: fileIndexSet])
    368363                current = YES;
    369             else
    370                 other = YES;
    371364        }
    372365       
    373366        [menuItem setState: current ? NSOnState : NSOffState];
    374         return current || other;
     367        return canChange;
    375368    }
    376369   
  • trunk/macosx/FileOutlineView.m

    r6270 r6887  
    140140        return;
    141141   
    142     int col = [self columnWithIdentifier: @"Priority"];
    143142    NSPoint mouseLocation = [self convertPoint: [[self window] convertScreenToBase: [NSEvent mouseLocation]] fromView: nil];
    144143   
    145     int row;
    146     for (row = visibleRows.location; row < NSMaxRange(visibleRows); row++)
     144    for (NSInteger row = visibleRows.location, col = [self columnWithIdentifier: @"Priority"]; row < NSMaxRange(visibleRows); row++)
    147145    {
    148146        FilePriorityCell * cell = (FilePriorityCell *)[self preparedCellAtColumn: col row: row];
  • trunk/macosx/FilePriorityCell.m

    r5904 r6887  
    3838        [self setSegmentCount: 3];
    3939       
    40         int i;
    41         for (i = 0; i < [self segmentCount]; i++)
     40        for (NSInteger i = 0; i < [self segmentCount]; i++)
    4241        {
    4342            [self setLabel: @"" forSegment: i];
     
    106105    NSSet * priorities = [torrent filePrioritiesForIndexes: [node indexes]];
    107106   
    108     int count = [priorities count];
     107    const NSUInteger count = [priorities count];
    109108    if (fHoverRow && count > 0)
    110109    {
  • trunk/macosx/GroupToolbarItem.m

    r4423 r6887  
    4343    NSSegmentedControl * control = (NSSegmentedControl *)[self view];
    4444   
    45     int i;
    46     for (i = 0; i < [control segmentCount]; i++)
     45    for (NSInteger i = 0; i < [control segmentCount]; i++)
    4746        [control setEnabled: [[self target] validateToolbarItem:
    4847            [[[NSToolbarItem alloc] initWithItemIdentifier: [fIdentifiers objectAtIndex: i]] autorelease]] forSegment: i];
     
    5756    [menu setAutoenablesItems: NO];
    5857   
    59     NSMenuItem * addItem;
    60     int i, count = [(NSSegmentedControl *)[self view] segmentCount];
    61     for (i = 0; i < count; i++)
     58    const NSInteger count = [(NSSegmentedControl *)[self view] segmentCount];
     59    for (NSInteger i = 0; i < count; i++)
    6260    {
    63         addItem = [[NSMenuItem alloc] initWithTitle: [labels objectAtIndex: i] action: [self action] keyEquivalent: @""];
     61        NSMenuItem * addItem = [[NSMenuItem alloc] initWithTitle: [labels objectAtIndex: i] action: [self action] keyEquivalent: @""];
    6462        [addItem setTarget: [self target]];
    6563        [addItem setTag: i];
     
    7876    NSMenuItem * menuItem = [super menuFormRepresentation];
    7977   
    80     int i, count = [(NSSegmentedControl *)[self view] segmentCount];
    81     for (i = 0; i < count; i++)
     78    const NSInteger count = [(NSSegmentedControl *)[self view] segmentCount];
     79    for (NSInteger i = 0; i < count; i++)
    8280        [[[menuItem submenu] itemAtIndex: i] setEnabled: [[self target] validateToolbarItem:
    8381            [[[NSToolbarItem alloc] initWithItemIdentifier: [fIdentifiers objectAtIndex: i]] autorelease]]];
  • trunk/macosx/InfoWindowController.m

    r6885 r6887  
    10881088    NSIndexSet * indexes = [fileOutlineView selectedRowIndexes];
    10891089    NSMutableArray * urlArray = [NSMutableArray arrayWithCapacity: [indexes count]];
    1090 
    1091     int i;
    1092     for (i = [indexes firstIndex]; i != NSNotFound; i = [indexes indexGreaterThanIndex: i])
     1090   
     1091    for (NSUInteger i = [indexes firstIndex]; i != NSNotFound; i = [indexes indexGreaterThanIndex: i])
    10931092    {
    10941093        FileListNode * item = [fileOutlineView itemAtRow: i];
     
    11051104    NSIndexSet * indexes = [fileOutlineView selectedRowIndexes];
    11061105   
    1107     int i;
    1108     for (i = [indexes firstIndex]; i != NSNotFound; i = [indexes indexGreaterThanIndex: i])
     1106    for (NSUInteger i = [indexes firstIndex]; i != NSNotFound; i = [indexes indexGreaterThanIndex: i])
    11091107        if ([self canQuickLookFile: [fileOutlineView itemAtRow: i]])
    11101108            return YES;
     
    11211119    NSRange visibleRows = [fileOutlineView rowsInRect: [fileOutlineView bounds]];
    11221120   
    1123     int row;
    1124     for (row = visibleRows.location; row < NSMaxRange(visibleRows); row++)
     1121    for (NSUInteger row = visibleRows.location; row < NSMaxRange(visibleRows); row++)
    11251122    {
    11261123        FileListNode * rowItem = [fileOutlineView itemAtRow: row];
     
    16391636    [[self window] makeKeyWindow];
    16401637   
    1641     int i;
     1638    NSUInteger index = 1;
    16421639    if ([[fTorrents objectAtIndex: 0] hasAddedTrackers])
    16431640    {
    1644         for (i = 1; i < [fTrackers count]; i++)
    1645             if ([[fTrackers objectAtIndex: i] isKindOfClass: [NSNumber class]])
     1641        for (; index < [fTrackers count]; index++)
     1642            if ([[fTrackers objectAtIndex: index] isKindOfClass: [NSNumber class]])
    16461643                break;
    16471644    }
    16481645    else
    1649     {
    16501646        [fTrackers insertObject: [NSNumber numberWithInt: 0] atIndex: 0];
    1651         i = 1;
    1652     }
    1653    
    1654     [fTrackers insertObject: @"" atIndex: i];
     1647   
     1648    [fTrackers insertObject: @"" atIndex: index];
    16551649    [fTrackerTable reloadData];
    1656     [fTrackerTable selectRow: i byExtendingSelection: NO];
    1657     [fTrackerTable editColumn: 0 row: i withEvent: nil select: YES];
     1650    [fTrackerTable selectRow: index byExtendingSelection: NO];
     1651    [fTrackerTable editColumn: 0 row: index withEvent: nil select: YES];
    16581652}
    16591653
  • trunk/macosx/MessageWindowController.m

    r5628 r6887  
    149149- (void) updateLog: (NSTimer *) timer
    150150{
    151     tr_msg_list * messages, * currentMessage;
     151    tr_msg_list * messages;
    152152    if ((messages = tr_getQueuedMessages()) == NULL)
    153153        return;
    154154   
    155     for (currentMessage = messages; currentMessage != NULL; currentMessage = currentMessage->next)
     155    for (tr_msg_list * currentMessage = messages; currentMessage != NULL; currentMessage = currentMessage->next)
    156156    {
    157157        NSString * name = currentMessage->name != NULL ? [NSString stringWithUTF8String: currentMessage->name]
  • trunk/macosx/PiecesView.m

    r6215 r6887  
    131131    NSImage * image = [self image];
    132132   
    133     int i, j, index = -1;
     133    int index = -1;
    134134    NSRect rect = NSMakeRect(0, 0, fWidth, fWidth);
    135135    BOOL change = NO;
    136136   
    137     for (i = 0; i < fAcross; i++)
    138         for (j = 0; j < fAcross; j++)
     137    for (NSInteger i = 0; i < fAcross; i++)
     138        for (NSInteger j = 0; j < fAcross; j++)
    139139        {
    140140            index++;
  • trunk/macosx/Torrent.m

    r6885 r6887  
    558558           
    559559            //determine amount needed
    560             int i;
    561             for (i = 0; i < [self fileCount]; i++)
     560            for (int i = 0; i < [self fileCount]; i++)
    562561            {
    563562                if (tr_torrentGetFileDL(fHandle, i))
     
    792791    NSMutableArray * allTrackers = [NSMutableArray arrayWithCapacity: capacity];
    793792   
    794     int i, tier = -1;
    795     for (i = 0; i < count; i++)
     793    for (int i = 0, tier = -1; i < count; i++)
    796794    {
    797795        if (separators && tier != fInfo->trackers[i].tier)
     
    1001999- (NSArray *) peers
    10021000{
    1003     int totalPeers, i;
     1001    int totalPeers;
    10041002    tr_peer_stat * peers = tr_torrentPeers(fHandle, &totalPeers);
    10051003   
    10061004    NSMutableArray * peerDicts = [NSMutableArray arrayWithCapacity: totalPeers];
    10071005   
    1008     for (i = 0; i < totalPeers; i++)
     1006    for (int i = 0; i < totalPeers; i++)
    10091007    {
    10101008        tr_peer_stat * peer = &peers[i];
     
    10391037- (NSArray *) webSeeds
    10401038{
    1041     int webSeedCount = fInfo->webseedCount, i;
     1039    const int webSeedCount = fInfo->webseedCount;
    10421040    NSMutableArray * webSeeds = [NSMutableArray arrayWithCapacity: webSeedCount];
    10431041   
    10441042    float * dlSpeeds = tr_torrentWebSpeeds(fHandle);
    10451043   
    1046     for (i = 0; i < webSeedCount; i++)
     1044    for (int i = 0; i < webSeedCount; i++)
    10471045    {
    10481046        NSMutableDictionary * dict = [NSMutableDictionary dictionaryWithCapacity: 2];
     
    14461444    NSIndexSet * indexSet = [node indexes];
    14471445   
    1448     if (![node isFolder])
     1446    if ([indexSet count] == 1)
    14491447        return fFileStat[[indexSet firstIndex]].progress;
    14501448   
    14511449    uint64_t have = 0;
    1452     int index;
    1453     for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
     1450    for (int index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
    14541451        have += fFileStat[index].bytesCompleted;
    14551452   
     1453    NSAssert([node size], @"director in torrent file has size 0");
    14561454    return (float)have / [node size];
    14571455}
     
    14731471        [self updateFileStat];
    14741472   
    1475     int index;
    1476     for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
     1473    for (int index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
    14771474        if (fFileStat[index].progress < 1.0)
    14781475            return YES;
     
    14831480{
    14841481    BOOL onState = NO, offState = NO;
    1485     int index;
    1486     for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
     1482    for (int index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
    14871483    {
    14881484        if (tr_torrentGetFileDL(fHandle, index) || ![self canChangeDownloadCheckForFile: index])
     
    14991495- (void) setFileCheckState: (int) state forIndexes: (NSIndexSet *) indexSet
    15001496{
    1501     NSUInteger count = [indexSet count], i = 0, index;
     1497    NSUInteger count = [indexSet count];
    15021498    tr_file_index_t * files = malloc(count * sizeof(tr_file_index_t));
    1503     for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
    1504     {
     1499    for (NSUInteger index = [indexSet firstIndex], i = 0; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index], i++)
    15051500        files[i] = index;
    1506         i++;
    1507     }
    15081501   
    15091502    tr_torrentSetFileDLs(fHandle, files, count, state != NSOffState);
     
    15161509- (void) setFilePriority: (int) priority forIndexes: (NSIndexSet *) indexSet
    15171510{
    1518     NSUInteger count = [indexSet count], i = 0, index;
     1511    const NSUInteger count = [indexSet count];
    15191512    tr_file_index_t * files = malloc(count * sizeof(tr_file_index_t));
    1520     for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
    1521     {
     1513    for (NSUInteger index = [indexSet firstIndex], i = 0; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index], i++)
    15221514        files[i] = index;
    1523         i++;
    1524     }
    15251515   
    15261516    tr_torrentSetFilePriorities(fHandle, files, count, priority);
     
    15301520- (BOOL) hasFilePriority: (int) priority forIndexes: (NSIndexSet *) indexSet
    15311521{
    1532     int index;
    1533     for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
     1522    for (int index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
    15341523        if (priority == tr_torrentGetFilePriority(fHandle, index) && [self canChangeDownloadCheckForFile: index])
    15351524            return YES;
     
    15421531    NSMutableSet * priorities = [NSMutableSet setWithCapacity: 3];
    15431532   
    1544     int index, priority;
    1545     for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
     1533    for (int index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
    15461534    {
    15471535        if (![self canChangeDownloadCheckForFile: index])
    15481536            continue;
    15491537       
    1550         priority = tr_torrentGetFilePriority(fHandle, index);
     1538        int priority = tr_torrentGetFilePriority(fHandle, index);
    15511539        if (priority == TR_PRI_LOW)
    15521540        {
     
    17541742    if ([self isFolder])
    17551743    {
    1756         int count = [self fileCount], i;
     1744        int count = [self fileCount];
    17571745        NSMutableArray * fileList = [[NSMutableArray alloc] initWithCapacity: count];
    17581746       
    1759         for (i = 0; i < count; i++)
     1747        for (int i = 0; i < count; i++)
    17601748        {
    17611749            tr_file * file = &fInfo->files[i];
Note: See TracChangeset for help on using the changeset viewer.