X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/c882c7ee3b7e11b548c1b60ea46326c62c3eeb87..d890e8b8d837990529c247fe037612ab7e45ba8b:/MobileCydia.mm?ds=sidebyside diff --git a/MobileCydia.mm b/MobileCydia.mm index 7197a31b..7f053191 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -951,6 +951,11 @@ class CYColor { private: CGColorRef color_; + static CGColorRef Create_(CGColorSpaceRef space, float red, float green, float blue, float alpha) { + CGFloat color[] = {red, green, blue, alpha}; + return CGColorCreate(space, color); + } + public: CYColor() : color_(NULL) @@ -958,7 +963,7 @@ class CYColor { } CYColor(CGColorSpaceRef space, float red, float green, float blue, float alpha) : - color_(NULL) + color_(Create_(space, red, green, blue, alpha)) { Set(space, red, green, blue, alpha); } @@ -974,8 +979,7 @@ class CYColor { void Set(CGColorSpaceRef space, float red, float green, float blue, float alpha) { Clear(); - float color[] = {red, green, blue, alpha}; - color_ = CGColorCreate(space, (CGFloat *) color); + color_ = Create_(space, red, green, blue, alpha); } operator CGColorRef() { @@ -1803,8 +1807,6 @@ typedef std::map< unsigned long, _H > SourceMap; - (uint32_t) compareBySection:(NSArray *)sections; -- (uint32_t) compareForChanges; - - (void) install; - (void) remove; @@ -2676,33 +2678,6 @@ struct PackageNameOrdering : return _not(uint32_t); } -- (uint32_t) compareForChanges { - union { - uint32_t key; - - struct { - uint32_t timestamp : 30; - uint32_t ignored : 1; - uint32_t upgradable : 1; - } bits; - } value; - - bool upgradable([self upgradableAndEssential:YES]); - value.bits.upgradable = upgradable ? 1 : 0; - - if (upgradable) { - value.bits.timestamp = 0; - value.bits.ignored = [self ignored] ? 0 : 1; - value.bits.upgradable = 1; - } else { - value.bits.timestamp = static_cast([[self seen] timeIntervalSince1970]) >> 2; - value.bits.ignored = 0; - value.bits.upgradable = 0; - } - - return _not(uint32_t) - value.key; -} - - (void) clear { @synchronized (database_) { pkgProblemResolver *resolver = [database_ resolver];