Changeset 9297


Ignore:
Timestamp:
Oct 11, 2009, 5:17:29 PM (13 years ago)
Author:
livings124
Message:

add some more switch statement asserts

Location:
trunk/macosx
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.m

    r9293 r9297  
    768768            break;
    769769        default:
     770            NSAssert1(NO, @"Unknown info tab selected: %d", fCurrentTabTag);
    770771            return;
    771772    }
     
    10121013            "Inspector -> Peers tab -> table row tooltip"), portString]];
    10131014       
    1014         switch ([[peer objectForKey: @"From"] intValue])
     1015        const NSInteger peerFrom = [[peer objectForKey: @"From"] integerValue];
     1016        switch (peerFrom)
    10151017        {
    10161018            case TR_PEER_FROM_TRACKER:
     
    10291031                [components addObject: NSLocalizedString(@"From: distributed hash table", "Inspector -> Peers tab -> table row tooltip")];
    10301032                break;
     1033            default:
     1034                NSAssert1(NO, @"Peer from unknown source: %d", peerFrom);
    10311035        }
    10321036       
     
    11051109}
    11061110
    1107 #warning what?!
     1111#warning is editing trackers needed?
    11081112/*- (BOOL) tableView: (NSTableView *) tableView shouldEditTableColumn: (NSTableColumn *) tableColumn row: (NSInteger) row
    11091113{
     
    12741278            break;
    12751279        default:
     1280            NSAssert1(NO, @"Unknown option selected in ratio popup: %d", [sender indexOfSelectedItem]);
    12761281            return;
    12771282    }
     
    13111316            break;
    13121317        default:
     1318            NSAssert1(NO, @"Unknown option selected in priority popup: %d", [sender indexOfSelectedItem]);
    13131319            return;
    13141320    }
     
    14421448    Torrent * torrent = [fTorrents objectAtIndex: 0];
    14431449   
    1444     //get update tracker stats
     1450    //get updated tracker stats
    14451451    if ([fTrackerTable editedRow] == -1)
    14461452    {
     
    15551561            return fOptionsView;
    15561562        default:
     1563            NSAssert1(NO, @"Unknown tab view for tag: %d", tag);
    15571564            return nil;
    15581565    }
  • trunk/macosx/MessageWindowController.m

    r9296 r9297  
    139139- (void) updateLog: (NSTimer *) timer
    140140{
    141     static NSUInteger currentIndex = 0;
    142    
    143141    tr_msg_list * messages;
    144142    if ((messages = tr_getQueuedMessages()) == NULL)
    145143        return;
    146144   
     145    static NSUInteger currentIndex = 0;
    147146    for (tr_msg_list * currentMessage = messages; currentMessage != NULL; currentMessage = currentMessage->next)
    148147    {
  • trunk/macosx/Torrent.h

    r9292 r9297  
    131131
    132132- (NSMutableArray *) allTrackerStats;
    133 - (NSMutableArray *) allTrackersFlat; //used by GroupRules
     133- (NSArray *) allTrackersFlat; //used by GroupRules
    134134- (BOOL) addTrackerToNewTier: (NSString *) tracker;
    135135- (void) removeTrackersWithAnnounceAddresses: (NSSet *) trackers;
  • trunk/macosx/Torrent.m

    r9292 r9297  
    696696}
    697697
    698 - (NSMutableArray *) allTrackersFlat
     698- (NSArray *) allTrackersFlat
    699699{
    700700    NSMutableArray * allTrackers = [NSMutableArray arrayWithCapacity: fInfo->trackerCount];
Note: See TracChangeset for help on using the changeset viewer.