Skip to content

Commit

Permalink
delete typealias RunLoopObserver::Unique
Browse files Browse the repository at this point in the history
Differential Revision: D64302758
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Oct 16, 2024
1 parent 7b62e47 commit fa50e13
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/react-native/React/Fabric/AppleEventBeat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace facebook::react {

AppleEventBeat::AppleEventBeat(
std::shared_ptr<OwnerBox> ownerBox,
RunLoopObserver::Unique uiRunLoopObserver,
std::unique_ptr<const RunLoopObserver> uiRunLoopObserver,
RuntimeExecutor runtimeExecutor)
: EventBeat(std::move(ownerBox), std::move(runtimeExecutor)),
uiRunLoopObserver_(std::move(uiRunLoopObserver)) {
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native/React/Fabric/AppleEventBeat.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AppleEventBeat : public EventBeat, public RunLoopObserver::Delegate {
public:
AppleEventBeat(
std::shared_ptr<OwnerBox> ownerBox,
RunLoopObserver::Unique uiRunLoopObserver,
std::unique_ptr<const RunLoopObserver> uiRunLoopObserver,
RuntimeExecutor runtimeExecutor);

#pragma mark - RunLoopObserver::Delegate
Expand All @@ -32,7 +32,7 @@ class AppleEventBeat : public EventBeat, public RunLoopObserver::Delegate {
RunLoopObserver::Activity activity) const noexcept override;

private:
RunLoopObserver::Unique uiRunLoopObserver_;
std::unique_ptr<const RunLoopObserver> uiRunLoopObserver_;
};

} // namespace facebook::react
2 changes: 1 addition & 1 deletion packages/react-native/React/Fabric/RCTScheduler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ @implementation RCTScheduler {
std::shared_ptr<LayoutAnimationDriver> _animationDriver;
std::shared_ptr<SchedulerDelegateProxy> _delegateProxy;
std::shared_ptr<LayoutAnimationDelegateProxy> _layoutAnimationDelegateProxy;
RunLoopObserver::Unique _uiRunLoopObserver;
std::unique_ptr<const PlatformRunLoopObserver> _uiRunLoopObserver;
}

- (instancetype)initWithToolbox:(SchedulerToolbox)toolbox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ namespace facebook::react {
*/
class RunLoopObserver {
public:
using Unique = std::unique_ptr<const RunLoopObserver>;

/*
* The concept of an owner.
* A run loop observer normally observes a run loop running on a different
Expand Down

0 comments on commit fa50e13

Please sign in to comment.