diff --git a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm index bcdeadac928..87350b07b8e 100644 --- a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm @@ -115,7 +115,7 @@ using namespace facebook::react; // MAP_SCROLL_VIEW_PROP(snapToAlignment); } -- (void)updateState:(State::Shared)state oldState:(State::Shared)oldState +- (void)updateState:(State::Shared const &)state oldState:(State::Shared const &)oldState { assert(std::dynamic_pointer_cast(state)); _state = std::static_pointer_cast(state); diff --git a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h index d8593c0c362..9d91ebb73df 100644 --- a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +++ b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h @@ -73,9 +73,9 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)updateProps:(facebook::react::Props::Shared const &)props oldProps:(facebook::react::Props::Shared const &)oldProps NS_REQUIRES_SUPER; -- (void)updateEventEmitter:(facebook::react::SharedEventEmitter)eventEmitter NS_REQUIRES_SUPER; -- (void)updateLayoutMetrics:(facebook::react::LayoutMetrics)layoutMetrics - oldLayoutMetrics:(facebook::react::LayoutMetrics)oldLayoutMetrics NS_REQUIRES_SUPER; +- (void)updateEventEmitter:(facebook::react::EventEmitter::Shared const &)eventEmitter NS_REQUIRES_SUPER; +- (void)updateLayoutMetrics:(facebook::react::LayoutMetrics const &)layoutMetrics + oldLayoutMetrics:(facebook::react::LayoutMetrics const &)oldLayoutMetrics NS_REQUIRES_SUPER; - (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask NS_REQUIRES_SUPER; - (void)prepareForRecycle NS_REQUIRES_SUPER; diff --git a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm index c723fdd63a7..22921328b02 100644 --- a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -243,13 +243,14 @@ using namespace facebook::react; _needsInvalidateLayer = _needsInvalidateLayer || needsInvalidateLayer; } -- (void)updateEventEmitter:(SharedEventEmitter)eventEmitter +- (void)updateEventEmitter:(EventEmitter::Shared const &)eventEmitter { assert(std::dynamic_pointer_cast(eventEmitter)); _eventEmitter = std::static_pointer_cast(eventEmitter); } -- (void)updateLayoutMetrics:(LayoutMetrics)layoutMetrics oldLayoutMetrics:(LayoutMetrics)oldLayoutMetrics +- (void)updateLayoutMetrics:(LayoutMetrics const &)layoutMetrics + oldLayoutMetrics:(LayoutMetrics const &)oldLayoutMetrics { [super updateLayoutMetrics:layoutMetrics oldLayoutMetrics:oldLayoutMetrics]; diff --git a/React/Fabric/Mounting/RCTComponentViewProtocol.h b/React/Fabric/Mounting/RCTComponentViewProtocol.h index 0269217bdaf..e2301348dc4 100644 --- a/React/Fabric/Mounting/RCTComponentViewProtocol.h +++ b/React/Fabric/Mounting/RCTComponentViewProtocol.h @@ -84,22 +84,23 @@ typedef NS_OPTIONS(NSInteger, RNComponentViewUpdateMask) { * Called for updating component's state. * Receiver must update native view according to changed state. */ -- (void)updateState:(facebook::react::State::Shared)state oldState:(facebook::react::State::Shared)oldState; +- (void)updateState:(facebook::react::State::Shared const &)state + oldState:(facebook::react::State::Shared const &)oldState; /* * Called for updating component's event handlers set. * Receiver must cache `eventEmitter` object inside and use it for emitting * events when needed. */ -- (void)updateEventEmitter:(facebook::react::SharedEventEmitter)eventEmitter; +- (void)updateEventEmitter:(facebook::react::EventEmitter::Shared const &)eventEmitter; /* * Called for updating component's layout metrics. * Receiver must update `UIView` layout-related fields (such as `frame`, * `bounds`, `layer.zPosition`, and so on) accordingly. */ -- (void)updateLayoutMetrics:(facebook::react::LayoutMetrics)layoutMetrics - oldLayoutMetrics:(facebook::react::LayoutMetrics)oldLayoutMetrics; +- (void)updateLayoutMetrics:(facebook::react::LayoutMetrics const &)layoutMetrics + oldLayoutMetrics:(facebook::react::LayoutMetrics const &)oldLayoutMetrics; /* * Called right after all update methods were called for a particular component view. diff --git a/React/Fabric/Mounting/UIView+ComponentViewProtocol.h b/React/Fabric/Mounting/UIView+ComponentViewProtocol.h index 831708f2f49..ac46d801c6c 100644 --- a/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +++ b/React/Fabric/Mounting/UIView+ComponentViewProtocol.h @@ -25,15 +25,16 @@ NS_ASSUME_NONNULL_BEGIN - (void)updateProps:(facebook::react::Props::Shared const &)props oldProps:(facebook::react::Props::Shared const &)oldProps; -- (void)updateEventEmitter:(facebook::react::SharedEventEmitter)eventEmitter; +- (void)updateEventEmitter:(facebook::react::EventEmitter::Shared const &)eventEmitter; - (void)updateLocalData:(facebook::react::SharedLocalData)localData oldLocalData:(facebook::react::SharedLocalData)oldLocalData; -- (void)updateState:(facebook::react::State::Shared)state oldState:(facebook::react::State::Shared)oldState; +- (void)updateState:(facebook::react::State::Shared const &)state + oldState:(facebook::react::State::Shared const &)oldState; -- (void)updateLayoutMetrics:(facebook::react::LayoutMetrics)layoutMetrics - oldLayoutMetrics:(facebook::react::LayoutMetrics)oldLayoutMetrics; +- (void)updateLayoutMetrics:(facebook::react::LayoutMetrics const &)layoutMetrics + oldLayoutMetrics:(facebook::react::LayoutMetrics const &)oldLayoutMetrics; - (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask; diff --git a/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm b/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm index db23fecf50b..a6f5f240e43 100644 --- a/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +++ b/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm @@ -44,7 +44,7 @@ using namespace facebook::react; // Default implementation does nothing. } -- (void)updateEventEmitter:(SharedEventEmitter)eventEmitter +- (void)updateEventEmitter:(EventEmitter::Shared const &)eventEmitter { // Default implementation does nothing. } @@ -54,12 +54,14 @@ using namespace facebook::react; // Default implementation does nothing. } -- (void)updateState:(facebook::react::State::Shared)state oldState:(facebook::react::State::Shared)oldState +- (void)updateState:(facebook::react::State::Shared const &)state + oldState:(facebook::react::State::Shared const &)oldState { // Default implementation does nothing. } -- (void)updateLayoutMetrics:(LayoutMetrics)layoutMetrics oldLayoutMetrics:(LayoutMetrics)oldLayoutMetrics +- (void)updateLayoutMetrics:(LayoutMetrics const &)layoutMetrics + oldLayoutMetrics:(LayoutMetrics const &)oldLayoutMetrics { if (layoutMetrics.frame != oldLayoutMetrics.frame) { CGRect frame = RCTCGRectFromRect(layoutMetrics.frame);