Skip to content

Commit cfb9183

Browse files
sammy-SCmeta-codesync[bot]
authored andcommitted
Fix minor issues in UIManager (#55686)
Summary: Pull Request resolved: #55686 changelog: [internal] Small cleanup in UIManager Reviewed By: lenaic Differential Revision: D90330663 fbshipit-source-id: 0685725bb9d1f4d7d4c2aa5a76666ef0e01d9d21
1 parent 1707d30 commit cfb9183

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ void UIManager::setNativeProps_DEPRECATED(
469469
->getProps(),
470470
RawProps(rawProps));
471471

472-
return oldShadowNode.clone({/* .props = */ .props = props});
472+
return oldShadowNode.clone({.props = props});
473473
});
474474

475475
return std::static_pointer_cast<RootShadowNode>(rootNode);
@@ -493,15 +493,12 @@ void UIManager::configureNextLayoutAnimation(
493493
const jsi::Value& failureCallback) const {
494494
if (animationDelegate_ != nullptr) {
495495
animationDelegate_->uiManagerDidConfigureNextLayoutAnimation(
496-
runtime,
497-
config,
498-
std::move(successCallback),
499-
std::move(failureCallback));
496+
runtime, config, successCallback, failureCallback);
500497
}
501498
}
502499

503500
static std::shared_ptr<const ShadowNode> findShadowNodeByTagRecursively(
504-
std::shared_ptr<const ShadowNode> parentShadowNode,
501+
const std::shared_ptr<const ShadowNode>& parentShadowNode,
505502
Tag tag) {
506503
if (parentShadowNode->getTag() == tag) {
507504
return parentShadowNode;

packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class UIManager final : public ShadowTreeDelegate {
6868
std::weak_ptr<UIManagerAnimationBackend> unstable_getAnimationBackend();
6969

7070
/**
71-
* Execute stopSurface on any UIMAnagerAnimationDelegate.
71+
* Execute stopSurface on any UIManagerAnimationDelegate.
7272
*/
7373
void stopSurfaceForAnimationDelegate(SurfaceId surfaceId) const;
7474

@@ -79,9 +79,9 @@ class UIManager final : public ShadowTreeDelegate {
7979
void synchronouslyUpdateViewOnUIThread(Tag tag, const folly::dynamic &props);
8080

8181
/*
82-
* Provides access to a UIManagerBindging.
82+
* Provides access to a UIManagerBinding.
8383
* The `callback` methods will not be called if the internal pointer to
84-
* `UIManagerBindging` is `nullptr`.
84+
* `UIManagerBinding` is `nullptr`.
8585
* The callback is called synchronously on the same thread.
8686
*/
8787
void visitBinding(

0 commit comments

Comments
 (0)