Skip to content

Commit

Permalink
Explicitly default YGNode copy ctor
Browse files Browse the repository at this point in the history
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
  • Loading branch information
swolchok authored and facebook-github-bot committed Jul 18, 2018
1 parent 46fb04e commit 165dd40
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions ReactCommon/yoga/yoga/YGNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 165dd40

Please sign in to comment.