Skip to content

Commit e41dce3

Browse files
generatedunixname89002005287564facebook-github-bot
authored andcommitted
Fix CQS signal readability-implicit-bool-conversion in xplat/js/react-native-github/packages (react#53583)
Summary: Pull Request resolved: react#53583 Reviewed By: rshest Differential Revision: D81575288 fbshipit-source-id: 0315c0ac759799dc9a84e68fa8d957b5547b1682
1 parent 2cd06ad commit e41dce3

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ - (void)setBridge:(RCTBridge *)bridge
141141
RCTExecuteOnUIManagerQueue(^{
142142
RCTBaseTextInputShadowView *shadowView =
143143
(RCTBaseTextInputShadowView *)[self.bridge.uiManager shadowViewForReactTag:viewTag];
144-
if (value) {
144+
if (value != nullptr) {
145145
[shadowView setText:value];
146146
}
147147
[self.bridge.uiManager setNeedsLayout];

packages/react-native/Libraries/TypeSafety/RCTTypedModuleConstants.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ @implementation _RCTTypedModuleConstants {
1616
+ (instancetype)newWithUnsafeDictionary:(NSDictionary<NSString *, id> *)dictionary
1717
{
1818
_RCTTypedModuleConstants *constants = [self new];
19-
if (constants) {
19+
if (constants != nullptr) {
2020
constants->_dictionary = dictionary;
2121
}
2222
return constants;

packages/react-native/React/Base/RCTBridgeProxy.mm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ - (instancetype)initWithViewRegistry:(RCTViewRegistry *)viewRegistry
5353
launchOptions:(nullable NSDictionary *)launchOptions
5454
{
5555
self = [super self];
56-
if (self) {
56+
if (self != nullptr) {
5757
_uiManagerProxy = [[RCTUIManagerProxy alloc] initWithViewRegistry:viewRegistry];
5858
_moduleRegistry = moduleRegistry;
5959
_bundleManager = bundleManager;
@@ -75,7 +75,7 @@ - (void)dispatchBlock:(dispatch_block_t)block queue:(dispatch_queue_t)queue
7575

7676
if (queue == RCTJSThread) {
7777
_dispatchToJSThread(block);
78-
} else if (queue) {
78+
} else if (queue != nullptr) {
7979
dispatch_async(queue, block);
8080
}
8181
}
@@ -427,7 +427,7 @@ @implementation RCTUIManagerProxy {
427427
- (instancetype)initWithViewRegistry:(RCTViewRegistry *)viewRegistry
428428
{
429429
self = [super self];
430-
if (self) {
430+
if (self != nullptr) {
431431
_viewRegistry = viewRegistry;
432432
_legacyViewRegistry = [NSMutableDictionary new];
433433
}
@@ -443,8 +443,8 @@ - (UIView *)viewForReactTag:(NSNumber *)reactTag
443443
{
444444
[self logWarning:@"Please migrate to RCTViewRegistry: @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED."
445445
cmd:_cmd];
446-
UIView *view = [_viewRegistry viewForReactTag:reactTag] ? [_viewRegistry viewForReactTag:reactTag]
447-
: [_legacyViewRegistry objectForKey:reactTag];
446+
UIView *view = ([_viewRegistry viewForReactTag:reactTag] != nullptr) ? [_viewRegistry viewForReactTag:reactTag]
447+
: [_legacyViewRegistry objectForKey:reactTag];
448448
return RCTPaperViewOrCurrentView(view);
449449
}
450450

@@ -457,7 +457,7 @@ - (void)addUIBlock:(RCTViewManagerUIBlock)block
457457
__weak __typeof(self) weakSelf = self;
458458
RCTExecuteOnMainQueue(^{
459459
__typeof(self) strongSelf = weakSelf;
460-
if (strongSelf) {
460+
if (strongSelf != nullptr) {
461461
RCTUIManager *proxiedManager = (RCTUIManager *)strongSelf;
462462
RCTComposedViewRegistry *composedViewRegistry =
463463
[[RCTComposedViewRegistry alloc] initWithUIManager:proxiedManager

0 commit comments

Comments
 (0)