diff --git a/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm b/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm index e3d7d205457..a30ba75dc59 100644 --- a/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm +++ b/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm @@ -141,7 +141,7 @@ RCT_EXPORT_METHOD(setTextAndSelection RCTExecuteOnUIManagerQueue(^{ RCTBaseTextInputShadowView *shadowView = (RCTBaseTextInputShadowView *)[self.bridge.uiManager shadowViewForReactTag:viewTag]; - if (value) { + if (value != nullptr) { [shadowView setText:value]; } [self.bridge.uiManager setNeedsLayout]; diff --git a/packages/react-native/Libraries/TypeSafety/RCTTypedModuleConstants.mm b/packages/react-native/Libraries/TypeSafety/RCTTypedModuleConstants.mm index a1ff4f0cbaa..b2f45da1cf9 100644 --- a/packages/react-native/Libraries/TypeSafety/RCTTypedModuleConstants.mm +++ b/packages/react-native/Libraries/TypeSafety/RCTTypedModuleConstants.mm @@ -16,7 +16,7 @@ + (instancetype)newWithUnsafeDictionary:(NSDictionary *)dictionary { _RCTTypedModuleConstants *constants = [self new]; - if (constants) { + if (constants != nullptr) { constants->_dictionary = dictionary; } return constants; diff --git a/packages/react-native/React/Base/RCTBridgeProxy.mm b/packages/react-native/React/Base/RCTBridgeProxy.mm index c8ebec6b710..9608f72bf5e 100644 --- a/packages/react-native/React/Base/RCTBridgeProxy.mm +++ b/packages/react-native/React/Base/RCTBridgeProxy.mm @@ -53,7 +53,7 @@ using namespace facebook; launchOptions:(nullable NSDictionary *)launchOptions { self = [super self]; - if (self) { + if (self != nullptr) { _uiManagerProxy = [[RCTUIManagerProxy alloc] initWithViewRegistry:viewRegistry]; _moduleRegistry = moduleRegistry; _bundleManager = bundleManager; @@ -75,7 +75,7 @@ using namespace facebook; if (queue == RCTJSThread) { _dispatchToJSThread(block); - } else if (queue) { + } else if (queue != nullptr) { dispatch_async(queue, block); } } @@ -427,7 +427,7 @@ using namespace facebook; - (instancetype)initWithViewRegistry:(RCTViewRegistry *)viewRegistry { self = [super self]; - if (self) { + if (self != nullptr) { _viewRegistry = viewRegistry; _legacyViewRegistry = [NSMutableDictionary new]; } @@ -443,8 +443,8 @@ using namespace facebook; { [self logWarning:@"Please migrate to RCTViewRegistry: @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED." cmd:_cmd]; - UIView *view = [_viewRegistry viewForReactTag:reactTag] ? [_viewRegistry viewForReactTag:reactTag] - : [_legacyViewRegistry objectForKey:reactTag]; + UIView *view = ([_viewRegistry viewForReactTag:reactTag] != nullptr) ? [_viewRegistry viewForReactTag:reactTag] + : [_legacyViewRegistry objectForKey:reactTag]; return RCTPaperViewOrCurrentView(view); } @@ -457,7 +457,7 @@ using namespace facebook; __weak __typeof(self) weakSelf = self; RCTExecuteOnMainQueue(^{ __typeof(self) strongSelf = weakSelf; - if (strongSelf) { + if (strongSelf != nullptr) { RCTUIManager *proxiedManager = (RCTUIManager *)strongSelf; RCTComposedViewRegistry *composedViewRegistry = [[RCTComposedViewRegistry alloc] initWithUIManager:proxiedManager