From 72fb75d4d48d3dbe4a339b2503b796716af6e5b5 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 27 Apr 2023 06:48:04 -0700 Subject: [PATCH] Remove config variant copy ctor from YGNode (#37091) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37091 X-link: https://github.com/facebook/yoga/pull/1258 This private constructor was added specifically for Fabric when config setting was deprecated, but that is undeprecated now. Fbsource fabric was moved off of it, and the RN desktop for was in the last diff in the stack, so we can remove it now. Reviewed By: yungsters Differential Revision: D45292729 fbshipit-source-id: 87b2a1adaafaf817befe44dbc3ac178af59a6e68 --- .../react-native/ReactCommon/yoga/yoga/YGNode.cpp | 11 ----------- packages/react-native/ReactCommon/yoga/yoga/YGNode.h | 4 ---- 2 files changed, 15 deletions(-) diff --git a/packages/react-native/ReactCommon/yoga/yoga/YGNode.cpp b/packages/react-native/ReactCommon/yoga/yoga/YGNode.cpp index 90e13fadceb..9045037b873 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/YGNode.cpp +++ b/packages/react-native/ReactCommon/yoga/yoga/YGNode.cpp @@ -23,17 +23,6 @@ YGNode::YGNode(const YGConfigRef config) : config_{config} { } }; -YGNode::YGNode(const YGNode& node, YGConfigRef config) : YGNode{node} { - YGAssert( - config != nullptr, "Attempting to construct YGNode with null config"); - - config_ = config; - flags_.hasNewLayout = true; - if (config->useWebDefaults) { - useWebDefaults(); - } -} - YGNode::YGNode(YGNode&& node) { context_ = node.context_; flags_ = node.flags_; diff --git a/packages/react-native/ReactCommon/yoga/yoga/YGNode.h b/packages/react-native/ReactCommon/yoga/yoga/YGNode.h index b57a1207af9..6f9cab38e5b 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/YGNode.h +++ b/packages/react-native/ReactCommon/yoga/yoga/YGNode.h @@ -93,10 +93,6 @@ public: // Should we remove this? YGNode(const YGNode& node) = default; - [[deprecated("Will be removed imminently")]] YGNode( - const YGNode& node, - YGConfigRef config); - // assignment means potential leaks of existing children, or alternatively // freeing unowned memory, double free, or freeing stack memory. YGNode& operator=(const YGNode&) = delete;