Changeset 9822 for trunk/macosx/Controller.m
- Timestamp:
- Dec 26, 2009, 12:02:20 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.m
r9812 r9822 2184 2184 [allTorrents sortUsingDescriptors: [NSArray arrayWithObject: groupDescriptor]]; 2185 2185 2186 NSMutableArray * groupTorrents;2186 TorrentGroup * group = nil; 2187 2187 NSInteger lastGroupValue = -2, currentOldGroupIndex = 0; 2188 2188 for (Torrent * torrent in allTorrents) 2189 2189 { 2190 NSInteger groupValue = [torrent groupValue];2190 const NSInteger groupValue = [torrent groupValue]; 2191 2191 if (groupValue != lastGroupValue) 2192 2192 { 2193 2193 lastGroupValue = groupValue; 2194 2194 2195 TorrentGroup *group = nil;2195 group = nil; 2196 2196 2197 2197 //try to see if the group already exists … … 2215 2215 group = [[[TorrentGroup alloc] initWithGroup: groupValue] autorelease]; 2216 2216 [fDisplayedTorrents addObject: group]; 2217 2218 groupTorrents = [group torrents];2219 2217 } 2220 2218 2221 [groupTorrents addObject: torrent]; 2219 NSAssert(group != nil, @"No group object to add torrents to"); 2220 [[group torrents] addObject: torrent]; 2222 2221 } 2223 2222 }
Note: See TracChangeset
for help on using the changeset viewer.