Explicitly default YGNode copy ctor

Summary: No need to type out the old version. This is exactly equivalent (unless I've misread and the old version did something other than memberwise copy).

Reviewed By: davidaurelio

Differential Revision: D8842326

fbshipit-source-id: c575ea4cee6caef9ea15aaf5967597385ed26ec3
This commit is contained in:
Scott Wolchok 2018-07-18 15:45:36 -07:00 committed by Facebook Github Bot
parent 46fb04e746
commit 165dd40bea
1 changed files with 1 additions and 16 deletions

View File

@ -271,22 +271,7 @@ YGNode::YGNode()
isDirty_(false),
resolvedDimensions_({{YGValueUndefined, YGValueUndefined}}) {}
YGNode::YGNode(const YGNode& node)
: context_(node.context_),
print_(node.print_),
hasNewLayout_(node.hasNewLayout_),
nodeType_(node.nodeType_),
measure_(node.measure_),
baseline_(node.baseline_),
dirtied_(node.dirtied_),
style_(node.style_),
layout_(node.layout_),
lineIndex_(node.lineIndex_),
owner_(node.owner_),
children_(node.children_),
config_(node.config_),
isDirty_(node.isDirty_),
resolvedDimensions_(node.resolvedDimensions_) {}
YGNode::YGNode(const YGNode& node) = default;
YGNode::YGNode(const YGConfigRef newConfig) : YGNode() {
config_ = newConfig;