Skip to content

Commit 6acb18c

Browse files
philIipfacebook-github-bot
authored andcommitted
do not return BOOL for start and stop methods
Summary: Changelog: [Internal] these are returning bools for some reason even though no one is using the returned value. changing them to return void Reviewed By: RSNara Differential Revision: D31594241 fbshipit-source-id: 04c115b573b74996eaf2fef631eedb12c6734ea8
1 parent f1aabc5 commit 6acb18c

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

React/Base/Surface/RCTSurface.mm

+2-4
Original file line numberDiff line numberDiff line change
@@ -567,18 +567,16 @@ - (void)uiManagerDidPerformMounting:(__unused RCTUIManager *)manager
567567
}
568568
}
569569

570-
- (BOOL)start
570+
- (void)start
571571
{
572572
// Does nothing.
573573
// The Start&Stop feature is not implemented for regular Surface yet.
574-
return YES;
575574
}
576575

577-
- (BOOL)stop
576+
- (void)stop
578577
{
579578
// Does nothing.
580579
// The Start&Stop feature is not implemented for regular Surface yet.
581-
return YES;
582580
}
583581

584582
#pragma mark - Mounting/Unmounting of React components

React/Base/Surface/RCTSurfaceProtocol.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,12 @@ NS_ASSUME_NONNULL_BEGIN
6868
@property (atomic, assign, readonly) CGSize intrinsicSize;
6969

7070
#pragma mark - Start & Stop
71-
7271
/**
7372
* Starts or stops the Surface.
7473
* Those methods are a no-op for regular RCTSurface (for now), but all call sites must call them appropriately.
7574
*/
76-
- (BOOL)start;
77-
- (BOOL)stop;
75+
- (void)start;
76+
- (void)stop;
7877

7978
@end
8079

React/Fabric/Surface/RCTFabricSurface.mm

+4-7
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ - (void)dealloc
8989

9090
#pragma mark - Life-cycle management
9191

92-
- (BOOL)start
92+
- (void)start
9393
{
9494
std::lock_guard<std::mutex> lock(_surfaceMutex);
9595

9696
if (_surfaceHandler->getStatus() != SurfaceHandler::Status::Registered) {
97-
return NO;
97+
return;
9898
}
9999

100100
// We need to register a root view component here synchronously because right after
@@ -108,15 +108,14 @@ - (BOOL)start
108108
[self _propagateStageChange];
109109

110110
[_surfacePresenter setupAnimationDriverWithSurfaceHandler:*_surfaceHandler];
111-
return YES;
112111
}
113112

114-
- (BOOL)stop
113+
- (void)stop
115114
{
116115
std::lock_guard<std::mutex> lock(_surfaceMutex);
117116

118117
if (_surfaceHandler->getStatus() != SurfaceHandler::Status::Running) {
119-
return NO;
118+
return;
120119
}
121120

122121
_surfaceHandler->stop();
@@ -126,8 +125,6 @@ - (BOOL)stop
126125
[self->_surfacePresenter.mountingManager detachSurfaceFromView:self.view
127126
surfaceId:self->_surfaceHandler->getSurfaceId()];
128127
});
129-
130-
return YES;
131128
}
132129

133130
#pragma mark - Immutable Properties (no need to enforce synchronization)

0 commit comments

Comments
 (0)