You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by dp...@apache.org on 2020/04/18 18:28:47 UTC

[cordova-ios] branch master updated: Fix type warnings and simplify code with auto boxing.

This is an automated email from the ASF dual-hosted git repository.

dpogue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-ios.git


The following commit(s) were added to refs/heads/master by this push:
     new 755484b  Fix type warnings and simplify code with auto boxing.
755484b is described below

commit 755484b75ec8bcae80e6219ad31ec7a4d17d6842
Author: Matthew Vosburgh <ma...@planetarycode.com>
AuthorDate: Tue Apr 7 18:02:28 2020 -0700

    Fix type warnings and simplify code with auto boxing.
---
 CordovaLib/Classes/Public/CDVPluginResult.m   | 2 +-
 CordovaLib/Classes/Public/CDVViewController.m | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/CordovaLib/Classes/Public/CDVPluginResult.m b/CordovaLib/Classes/Public/CDVPluginResult.m
index 2f6f3a6..930aeab 100644
--- a/CordovaLib/Classes/Public/CDVPluginResult.m
+++ b/CordovaLib/Classes/Public/CDVPluginResult.m
@@ -103,7 +103,7 @@ id messageFromMultipart(NSArray* theMessages)
 {
     self = [super init];
     if (self) {
-        status = [NSNumber numberWithInt:statusOrdinal];
+        status = @(statusOrdinal);
         message = theMessage;
         keepCallback = [NSNumber numberWithBool:NO];
     }
diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
index c0c12f8..785ef05 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -472,7 +472,7 @@
 
 - (BOOL)supportsOrientation:(UIInterfaceOrientation)orientation
 {
-    return [self.supportedOrientations containsObject:[NSNumber numberWithInt:orientation]];
+    return [self.supportedOrientations containsObject:@(orientation)];
 }
 
 - (UIView*)newCordovaViewWithFrame:(CGRect)bounds


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org