@@ -31,7 +31,7 @@ @implementation RCTActionSheetManager
3131- (instancetype )init
3232{
3333 self = [super init ];
34- if (self) {
34+ if (self != nullptr ) {
3535 _alertControllers = [NSMutableArray new ];
3636 }
3737 return self;
@@ -53,7 +53,7 @@ - (void)presentViewController:(UIViewController *)alertController
5353 alertController.modalPresentationStyle = UIModalPresentationPopover;
5454 UIView *sourceView = parentViewController.view ;
5555
56- if (anchorViewTag) {
56+ if (anchorViewTag != nullptr ) {
5757 sourceView = [self .viewRegistry_DEPRECATED viewForReactTag: anchorViewTag];
5858 } else {
5959 alertController.popoverPresentationController .permittedArrowDirections = 0 ;
@@ -166,12 +166,12 @@ - (void)presentViewController:(UIViewController *)alertController
166166 index++;
167167 }
168168
169- if (disabledButtonIndices) {
169+ if (disabledButtonIndices != nullptr ) {
170170 for (NSNumber *disabledButtonIndex in disabledButtonIndices) {
171171 if ([disabledButtonIndex integerValue ] < buttons.count ) {
172172 UIAlertAction *action = alertController.actions [[disabledButtonIndex integerValue]] ;
173173 [action setEnabled: false ];
174- if (disabledButtonTintColor) {
174+ if (disabledButtonTintColor != nullptr ) {
175175 [action setValue: disabledButtonTintColor forKey: @" titleTextColor" ];
176176 }
177177 } else {
@@ -235,14 +235,14 @@ - (void)presentViewController:(UIViewController *)alertController
235235 UIColor *tintColor = [RCTConvert UIColor: options.tintColor () ? @(*options.tintColor ()) : nil ];
236236
237237 dispatch_async (dispatch_get_main_queue (), ^{
238- if (message) {
238+ if (message != nullptr ) {
239239 [items addObject: message];
240240 }
241- if (URL ) {
241+ if (URL != nullptr ) {
242242 if ([URL .scheme.lowercaseString isEqualToString: @" data" ]) {
243243 NSError *error;
244244 NSData *data = [NSData dataWithContentsOfURL: URL options: (NSDataReadingOptions )0 error: &error];
245- if (! data) {
245+ if (data == nullptr ) {
246246 failureCallback (@[ RCTJSErrorFromNSError (error) ]);
247247 return ;
248248 }
@@ -258,17 +258,17 @@ - (void)presentViewController:(UIViewController *)alertController
258258
259259 UIActivityViewController *shareController = [[UIActivityViewController alloc ] initWithActivityItems: items
260260 applicationActivities: nil ];
261- if (subject) {
261+ if (subject != nullptr ) {
262262 [shareController setValue: subject forKey: @" subject" ];
263263 }
264- if (excludedActivityTypes) {
264+ if (excludedActivityTypes != nullptr ) {
265265 shareController.excludedActivityTypes = excludedActivityTypes;
266266 }
267267
268268 UIViewController *controller = RCTPresentedViewController ();
269269 shareController.completionWithItemsHandler =
270270 ^(NSString *activityType, BOOL completed, __unused NSArray *returnedItems, NSError *activityError) {
271- if (activityError) {
271+ if (activityError != nullptr ) {
272272 failureCallback (@[ RCTJSErrorFromNSError (activityError) ]);
273273 } else if (completed || activityType == nil ) {
274274 successCallback (@[ @(completed), RCTNullIfNil (activityType) ]);
0 commit comments