Use FOR_IN instead of while loop

This commit is contained in:
Gregory John Casamento 2024-07-27 19:46:51 -04:00
parent 6f2c542b46
commit 52eef305b0

View file

@ -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;
}