projects
/
cydia.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
233dfdf
)
Avoid NSMutableArray for temporary radix buffer.
author
Jay Freeman (saurik)
<saurik@saurik.com>
Mon, 15 Nov 2010 20:01:34 +0000
(12:01 -0800)
committer
Jay Freeman (saurik)
<saurik@saurik.com>
Mon, 15 Nov 2010 22:39:13 +0000
(14:39 -0800)
MobileCydia.mm
patch
|
blob
|
blame
|
history
diff --git
a/MobileCydia.mm
b/MobileCydia.mm
index 6f8737f11a688542c7ab0b13e0cf55250d16d212..e73cfe7beaad1e6c8ba5351862f9ef47390efde5 100644
(file)
--- 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;
}