From dfdb9ae0d3bc3689c3ca7b59e92f45c1b3ecb28f Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 7 Mar 2011 06:33:44 -0800 Subject: Fix _H<> copy assignment operator. --- CyteKit/WebViewController.mm | 6 +++--- Menes/ObjectHandle.h | 4 ++++ MobileCydia.mm | 3 +-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm index 496d8b2..03f0b95 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 fa446a5..716e6f4 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 ace39b4..92bce95 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]; } -- cgit v1.2.3