summaryrefslogtreecommitdiff
path: root/Cydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2008-10-15 00:19:47 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-09-30 07:08:50 +0000
commitec3f2f5367c6f1246d7e311e2293c6e0e83df0bc (patch)
tree5c82eb912343ec5e760da643c2b3a263d1f32f9b /Cydia.mm
parentdec6029f07c75ffe08b7edcfa26455c3ee7692e8 (diff)
Minor adjustments.
Diffstat (limited to 'Cydia.mm')
-rw-r--r--Cydia.mm10
1 files changed, 4 insertions, 6 deletions
diff --git a/Cydia.mm b/Cydia.mm
index f94557a..b4762a1 100644
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -282,9 +282,10 @@ extern NSString * const kCAFilterNearest;
[invocation getReturnValue:&item.key];
}
+ static const size_t width = 32;
static const size_t bits = 11;
static const size_t slots = 1 << bits;
- static const size_t passes = (32 + (bits - 1)) / bits;
+ static const size_t passes = (width + (bits - 1)) / bits;
size_t *hist(new size_t[slots]);
@@ -294,7 +295,7 @@ extern NSString * const kCAFilterNearest;
for (size_t i(0); i != count; ++i) {
uint32_t key(lhs[i].key);
key >>= pass * bits;
- key &= _not(uint32_t) >> 32 - bits;
+ key &= _not(uint32_t) >> width - bits;
++hist[key];
}
@@ -308,7 +309,7 @@ extern NSString * const kCAFilterNearest;
for (size_t i(0); i != count; ++i) {
uint32_t key(lhs[i].key);
key >>= pass * bits;
- key &= _not(uint32_t) >> 32 - bits;
+ key &= _not(uint32_t) >> width - bits;
rhs[hist[key]++] = lhs[i];
}
@@ -6265,7 +6266,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
return;
_UISwitchSlider *slider([cell control]);
- // XXX: this is just weird
BOOL value([slider value] != 0);
NSMutableDictionary *metadata([package_ metadata]);
@@ -6274,12 +6274,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
before = [number boolValue];
else
before = NO;
- NSLog(@"%@:%@ %@:%@ : %u:%u", cell, slider, name_, key, value, before);
if (value != before) {
[metadata setObject:[NSNumber numberWithBool:value] forKey:key];
Changed_ = true;
- //[delegate_ performSelector:@selector(updateData) withObject:nil afterDelay:0];
[delegate_ updateData];
}
}