Fix YGConfig
constructors
Summary: @public `YGConfig::YGConfig(YGConfig*)` was not initializing the same fields as the default constructors. Here, we make the default constructor delegate to the more specialized one to remove duplication. Reviewed By: SidharthGuglani Differential Revision: D15164599 fbshipit-source-id: 27247709091b7664386057d09ac67d481877871f
This commit is contained in:
committed by
Facebook Github Bot
parent
e51ca95713
commit
1adbafe950
@@ -45,7 +45,7 @@ private:
|
||||
uint32_t lineIndex_ = 0;
|
||||
YGNodeRef owner_ = nullptr;
|
||||
YGVector children_ = {};
|
||||
YGConfigRef config_ = nullptr;
|
||||
YGConfigRef config_;
|
||||
std::array<YGValue, 2> resolvedDimensions_ = {
|
||||
{YGValueUndefined, YGValueUndefined}};
|
||||
|
||||
@@ -66,16 +66,17 @@ private:
|
||||
using CompactValue = facebook::yoga::detail::CompactValue;
|
||||
|
||||
public:
|
||||
YGNode()
|
||||
YGNode() : YGNode{nullptr} {}
|
||||
explicit YGNode(const YGConfigRef newConfig)
|
||||
: hasNewLayout_{true},
|
||||
isReferenceBaseline_{false},
|
||||
isDirty_{false},
|
||||
nodeType_{YGNodeTypeDefault},
|
||||
measureUsesContext_{false},
|
||||
baselineUsesContext_{false},
|
||||
printUsesContext_{false} {}
|
||||
printUsesContext_{false},
|
||||
config_{newConfig} {};
|
||||
~YGNode() = default; // cleanup of owner/children relationships in YGNodeFree
|
||||
explicit YGNode(const YGConfigRef newConfig) : config_(newConfig){};
|
||||
|
||||
YGNode(YGNode&&);
|
||||
|
||||
|
Reference in New Issue
Block a user