call count instead of length

This commit is contained in:
Patryk Laurent 2019-09-03 23:19:27 -07:00
parent 425ffdb02c
commit c8030ce0cb

View file

@ -961,7 +961,7 @@ compareIt(id o1, id o2, void* context)
{
NSArray* sortedValues = [[self allValues] sortedArrayWithOptions: opts usingComparator: cmptr];
NSArray* noDuplicates = [[NSOrderedSet orderedSetWithArray:sortedValues] array];
NSMutableArray* result = [[NSMutableArray alloc] initWithCapacity:[sortedValues length]];
NSMutableArray* result = [[NSMutableArray alloc] initWithCapacity:[sortedValues count]];
for (NSObject* value in noDuplicates) {
[result addObjectsFromArray:[self allKeysForObject:value]];
}