From: Jay Freeman (saurik) Date: Mon, 7 Mar 2011 14:33:44 +0000 (-0800) Subject: Fix _H<> copy assignment operator. X-Git-Tag: v1.1.0%b1~31 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/dfdb9ae0d3bc3689c3ca7b59e92f45c1b3ecb28f Fix _H<> copy assignment operator. --- diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm index 496d8b21..03f0b95b 100644 --- a/CyteKit/WebViewController.mm +++ b/CyteKit/WebViewController.mm @@ -324,7 +324,7 @@ float CYScrollViewDecelerationRateNormal; return; if ([[error domain] isEqualToString:WebKitErrorDomain] && [error code] == WebKitErrorFrameLoadInterruptedByPolicyChange) { - request_ = (id) stage2_; + request_ = stage2_; stage1_ = nil; stage2_ = nil; return; @@ -414,7 +414,7 @@ float CYScrollViewDecelerationRateNormal; if ([frame parentFrame] == nil) if (decision == CYWebPolicyDecisionUse) if (!error_) { - stage1_ = (id) request_; + stage1_ = request_; request_ = request; } } @@ -525,7 +525,7 @@ float CYScrollViewDecelerationRateNormal; style_ = nil; function_ = nil; - stage2_ = (id) stage1_; + stage2_ = stage1_; stage1_ = nil; [self setHidesNavigationBar:NO]; diff --git a/Menes/ObjectHandle.h b/Menes/ObjectHandle.h index fa446a51..716e6f44 100644 --- a/Menes/ObjectHandle.h +++ b/Menes/ObjectHandle.h @@ -85,6 +85,10 @@ class MenesObjectHandle { CFRelease((CFTypeRef) old); } return *this; } + + _finline MenesObjectHandle &operator =(const MenesObjectHandle &value) { + return this->operator =(value.operator Type_ *()); + } }; #define _H MenesObjectHandle diff --git a/MobileCydia.mm b/MobileCydia.mm index ace39b4b..92bce95c 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -1462,8 +1462,7 @@ static void PackageImport(const void *key, const void *value, void *context) { host_ = [host_ lowercaseString]; if (host_ != nil) - // XXX: this is due to a bug in _H<> - authority_ = (id) host_; + authority_ = host_; else authority_ = [url path]; }