Skip to content

Commit b0db8aa

Browse files
generatedunixname89002005287564facebook-github-bot
authored andcommitted
Fix CQS signal readability-implicit-bool-conversion in xplat/js/react-native-github/packages (#53592)
Summary: Pull Request resolved: #53592 Reviewed By: rshest Differential Revision: D81569365 fbshipit-source-id: 88ec1b964a37774f29df9cbabca3c0e2c5ee4c53
1 parent 4553f87 commit b0db8aa

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/react-native/React/Fabric/Mounting/RCTComponentViewFactory.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,18 @@ - (void)_registerComponentIfPossible:(const std::string &)name
132132

133133
// Fallback 1: Call provider function for component view class.
134134
Class<RCTComponentViewProtocol> klass = RCTComponentViewClassWithName(name.c_str());
135-
if (klass) {
135+
if (klass != nullptr) {
136136
[self registerComponentViewClass:klass];
137137
return;
138138
}
139139

140140
// Fallback 2: Ask the provider and check in the dictionary provided
141-
if (self.thirdPartyFabricComponentsProvider) {
141+
if (self.thirdPartyFabricComponentsProvider != nullptr) {
142142
// Test whether a provider has been passed to avoid potentially expensive conversions
143143
// between C++ and ObjC strings.
144144
NSString *objcName = [NSString stringWithCString:name.c_str() encoding:NSUTF8StringEncoding];
145145
klass = self.thirdPartyFabricComponentsProvider.thirdPartyFabricComponents[objcName];
146-
if (klass) {
146+
if (klass != nullptr) {
147147
[self registerComponentViewClass:klass];
148148
return;
149149
}

packages/react-native/React/Fabric/Utils/PlatformRunLoopObserver.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static CFRunLoopActivity toCFRunLoopActivity(RunLoopObserver::Activity activity)
5454
mainRunLoopObserver_ = CFRunLoopObserverCreateWithHandler(
5555
NULL /* allocator */,
5656
toCFRunLoopActivity(activities_) /* activities */,
57-
true /* repeats */,
57+
1u /* repeats */,
5858
0 /* order */,
5959
^(CFRunLoopObserverRef observer, CFRunLoopActivity activity) {
6060
auto strongOwner = owner.lock();

packages/react-native/React/Fabric/Utils/RCTBoxShadow.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static CGRect insetRect(CGRect rect, CGFloat left, CGFloat top, CGFloat right, C
5050
static CGColorRef colorRefFromSharedColor(const SharedColor &color)
5151
{
5252
CGColorRef colorRef = RCTUIColorFromSharedColor(color).CGColor;
53-
return colorRef ? colorRef : [UIColor blackColor].CGColor;
53+
return (colorRef != nullptr) ? colorRef : [UIColor blackColor].CGColor;
5454
}
5555

5656
static CALayer *initBoxShadowLayer(const BoxShadow &shadow, CGSize layerSize)

0 commit comments

Comments
 (0)