From 755484b75ec8bcae80e6219ad31ec7a4d17d6842 Mon Sep 17 00:00:00 2001 From: Matthew Vosburgh Date: Tue, 7 Apr 2020 18:02:28 -0700 Subject: [PATCH] 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 2f6f3a6cb..930aeaba7 100644 --- a/CordovaLib/Classes/Public/CDVPluginResult.m +++ b/CordovaLib/Classes/Public/CDVPluginResult.m @@ -103,7 +103,7 @@ - (CDVPluginResult*)initWithStatus:(CDVCommandStatus)statusOrdinal message:(id)t { 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 c0c12f887..785ef0577 100644 --- a/CordovaLib/Classes/Public/CDVViewController.m +++ b/CordovaLib/Classes/Public/CDVViewController.m @@ -472,7 +472,7 @@ - (UIInterfaceOrientationMask)supportedInterfaceOrientations - (BOOL)supportsOrientation:(UIInterfaceOrientation)orientation { - return [self.supportedOrientations containsObject:[NSNumber numberWithInt:orientation]]; + return [self.supportedOrientations containsObject:@(orientation)]; } - (UIView*)newCordovaViewWithFrame:(CGRect)bounds