summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2010-11-15 12:01:34 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2010-11-15 14:39:13 -0800
commitfd119f42f8f2894fd3f38dfd8bcd75b973fe18b3 (patch)
tree8070ca920bc789b74c0c76e5cf30c04dee0c2f60 /MobileCydia.mm
parent233dfdfd80a6650680e45079030c28c7b7611017 (diff)
Avoid NSMutableArray for temporary radix buffer.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm7
1 files changed, 4 insertions, 3 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 6f8737f..e73cfe7 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -461,10 +461,11 @@ static void RadixSort_(NSMutableArray *self, size_t count, struct RadixItem_ *sw
delete [] hist;
- NSMutableArray *values([NSMutableArray arrayWithCapacity:count]);
+ const void **values(new const void *[count]);
for (size_t i(0); i != count; ++i)
- [values addObject:[self objectAtIndex:lhs[i].index]];
- [self setArray:values];
+ values[i] = [self objectAtIndex:lhs[i].index];
+ CFArrayReplaceValues((CFMutableArrayRef) self, CFRangeMake(0, count), values, count);
+ delete [] values;
delete [] swap;
}