From 36406ce17c5b6fa322cfe46b7b41375b70985e6c 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: X-link: https://github.com/facebook/react-native/pull/37091 Pull Request resolved: 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 --- yoga/YGNode.cpp | 11 ----------- yoga/YGNode.h | 4 ---- 2 files changed, 15 deletions(-) diff --git a/yoga/YGNode.cpp b/yoga/YGNode.cpp index 90e13fad..9045037b 100644 --- a/yoga/YGNode.cpp +++ b/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/yoga/YGNode.h b/yoga/YGNode.h index b57a1207..6f9cab38 100644 --- a/yoga/YGNode.h +++ b/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;