Changeset 4871
- Timestamp:
- Jan 30, 2008, 10:14:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.m
r4870 r4871 1891 1891 [fDisplayedTorrents sortUsingDescriptors: [NSArray arrayWithObject: groupDescriptor]]; 1892 1892 1893 int i, groupValue = [[fDisplayedTorrents objectAtIndex: 0] groupValue], newGroupValue, count = 1, start = 0;1893 int i, oldGroupValue = -2; 1894 1894 for (i = 0; i < [fDisplayedTorrents count]; i++) 1895 1895 { 1896 BOOL last = i == [fDisplayedTorrents count]-1; 1897 if (!last) 1898 newGroupValue = [[fDisplayedTorrents objectAtIndex: i+1] groupValue]; 1899 if (groupValue != newGroupValue || last) 1896 int groupValue = [[fDisplayedTorrents objectAtIndex: i] groupValue]; 1897 if (groupValue != oldGroupValue) 1900 1898 { 1901 [fDisplayedTorrents insertObject: [NSNumber numberWithInt: groupValue] atIndex: start];1902 [fDisplayedGroupIndexes addIndex: start];1899 [fDisplayedTorrents insertObject: [NSNumber numberWithInt: groupValue] atIndex: i]; 1900 [fDisplayedGroupIndexes addIndex: i]; 1903 1901 1904 groupValue = newGroupValue;1905 count = 1;1906 1907 start = i+2;1908 1902 i++; 1903 oldGroupValue = groupValue; 1909 1904 } 1910 else1911 count++;1912 1905 } 1913 1906 }
Note: See TracChangeset
for help on using the changeset viewer.