Skip to content

Commit

Permalink
Remove config variant copy ctor from YGNode (#37091)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #37091

X-link: facebook/yoga#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
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Apr 27, 2023
1 parent 7e0ea15 commit 72fb75d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
11 changes: 0 additions & 11 deletions packages/react-native/ReactCommon/yoga/yoga/YGNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down
4 changes: 0 additions & 4 deletions packages/react-native/ReactCommon/yoga/yoga/YGNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ struct YOGA_EXPORT YGNode {
// 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;
Expand Down

0 comments on commit 72fb75d

Please sign in to comment.