mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Updates to move towards ARC
This commit is contained in:
parent
0cd9843f5f
commit
2e07244f8e
15 changed files with 86 additions and 70 deletions
|
@ -960,11 +960,11 @@ compareIt(id o1, id o2, void* context)
|
|||
- (NSArray *) keysSortedByValueWithOptions: (NSSortOptions)opts
|
||||
usingComparator: (NSComparator)cmptr
|
||||
{
|
||||
CREATE_AUTORELEASE_POOL(arp);
|
||||
NSArray *sortedValues;
|
||||
NSArray *noDuplicates;
|
||||
NSMutableArray *result;
|
||||
|
||||
ENTER_POOL
|
||||
sortedValues = [[self allValues] sortedArrayWithOptions: opts
|
||||
usingComparator: cmptr];
|
||||
noDuplicates = [[NSOrderedSet orderedSetWithArray: sortedValues] array];
|
||||
|
@ -972,7 +972,7 @@ compareIt(id o1, id o2, void* context)
|
|||
FOR_IN(NSObject*, value, noDuplicates)
|
||||
[result addObjectsFromArray: [self allKeysForObject: value]];
|
||||
END_FOR_IN(noDuplicates)
|
||||
RELEASE(arp);
|
||||
LEAVE_POOL
|
||||
return AUTORELEASE(result);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue