Changeset 7387


Ignore:
Timestamp:
Dec 14, 2008, 4:04:55 PM (12 years ago)
Author:
livings124
Message:

add some asserts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/GroupsController.m

    r7386 r7387  
    466466            values = [torrent allTrackers: NO];
    467467        else
    468             continue;
     468            NSAssert1(NO, @"\"%@\" - unknown criteria", type);
    469469       
    470470        BOOL match = NO;
    471471       
    472         NSStringCompareOptions options = NSCaseInsensitiveSearch;
     472        NSStringCompareOptions options;
    473473        if ([place isEqualToString: @"begins"])
    474             options += NSAnchoredSearch;
     474            options = NSCaseInsensitiveSearch + NSAnchoredSearch;
    475475        else if ([place isEqualToString: @"ends"])
    476             options += NSBackwardsSearch + NSAnchoredSearch;
    477         else;
     476            options = NSCaseInsensitiveSearch + NSBackwardsSearch + NSAnchoredSearch;
     477        else if ([place isEqualToString: @"contains"])
     478            options = NSCaseInsensitiveSearch;
     479        else
     480            NSAssert2(NO, @"\"%@ - %@\" - unknown criteria", type, place);
    478481       
    479482        NSEnumerator * enumerator = [values objectEnumerator];
Note: See TracChangeset for help on using the changeset viewer.