Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9105017A8E for ; Thu, 25 Jun 2015 01:08:50 +0000 (UTC) Received: (qmail 7708 invoked by uid 500); 25 Jun 2015 01:08:50 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 7527 invoked by uid 500); 25 Jun 2015 01:08:50 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 7249 invoked by uid 99); 25 Jun 2015 01:08:49 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2015 01:08:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D3EB4E3650; Thu, 25 Jun 2015 01:08:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shazron@apache.org To: commits@cordova.apache.org Date: Thu, 25 Jun 2015 01:08:55 -0000 Message-Id: <2e8dfc48d4964d409ee3d40c22bed4f6@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [07/50] ios commit: Replace explicit boolean comparisons with implicit ones Replace explicit boolean comparisons with implicit ones (Avoids the "== YES" failing on (BOOL)2 problem) Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/d4829c1b Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/d4829c1b Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/d4829c1b Branch: refs/heads/master Commit: d4829c1baef9046db63123e437468a01a50c5832 Parents: 656ae1c Author: Ian Clelland Authored: Thu Oct 30 14:13:17 2014 -0400 Committer: Ian Clelland Committed: Thu Mar 19 11:06:30 2015 -0400 ---------------------------------------------------------------------- CordovaLib/Classes/Public/CDVViewController.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d4829c1b/CordovaLib/Classes/Public/CDVViewController.m ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m index 305c63e..d75df96 100644 --- a/CordovaLib/Classes/Public/CDVViewController.m +++ b/CordovaLib/Classes/Public/CDVViewController.m @@ -616,7 +616,7 @@ CDVPlugin* plugin = [pluginObjects objectForKey:pluginName]; SEL selector = NSSelectorFromString(@"shouldOverrideLoadWithRequest:navigationType:"); if ([plugin respondsToSelector:selector]) { - if (((BOOL (*)(id, SEL, id, int))objc_msgSend)(plugin, selector, request, navigationType) == YES) { + if (((BOOL (*)(id, SEL, id, int))objc_msgSend)(plugin, selector, request, navigationType)) { return NO; } } @@ -625,7 +625,7 @@ /* * If we loaded the HTML from a string, we let the app handle it */ - if (self.loadFromString == YES) { + if (self.loadFromString) { self.loadFromString = NO; return YES; } @@ -691,7 +691,7 @@ if ([plugin respondsToSelector:selector]) { anyPluginsResponded = YES; shouldAllowRequest = ((BOOL (*)(id, SEL, id))objc_msgSend)(plugin, selector, url); - if (shouldAllowRequest == NO) { + if (!shouldAllowRequest) { break; } } @@ -715,7 +715,7 @@ if ([plugin respondsToSelector:selector]) { anyPluginsResponded = YES; shouldAllowNavigation = ((BOOL (*)(id, SEL, id))objc_msgSend)(plugin, selector, url); - if (shouldAllowNavigation == NO) { + if (!shouldAllowNavigation) { break; } } @@ -738,7 +738,7 @@ if ([plugin respondsToSelector:selector]) { anyPluginsResponded = YES; shouldOpenExternalURL = ((BOOL (*)(id, SEL, id))objc_msgSend)(plugin, selector, url); - if (shouldOpenExternalURL == NO) { + if (!shouldOpenExternalURL) { break; } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org