cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [07/50] ios commit: Replace explicit boolean comparisons with implicit ones
Date Thu, 25 Jun 2015 01:08:55 GMT
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 <iclelland@chromium.org>
Authored: Thu Oct 30 14:13:17 2014 -0400
Committer: Ian Clelland <iclelland@chromium.org>
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


Mime
View raw message