mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 20:50:44 +00:00
Use FOR_IN instead of while loop
This commit is contained in:
parent
6f2c542b46
commit
52eef305b0
1 changed files with 3 additions and 4 deletions
|
@ -224,15 +224,14 @@
|
|||
- (NSArray *) selectedObjects
|
||||
{
|
||||
NSMutableArray *selectedObjects = [NSMutableArray array];
|
||||
NSEnumerator *en = [_selection_index_paths objectEnumerator];
|
||||
NSIndexPath *path = nil;
|
||||
|
||||
while ((path = [en nextObject]) != nil)
|
||||
FOR_IN(NSIndexPath*, path, _selection_index_paths)
|
||||
{
|
||||
id obj = [self _objectAtIndexPath: path];
|
||||
[selectedObjects addObject: obj];
|
||||
}
|
||||
|
||||
END_FOR_IN(_selection_index_paths);
|
||||
|
||||
return selectedObjects;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue