inline trivial constructors / methods

Summary:
@public

inlines some trivial constructors, destructors, and methods.

Reviewed By: astreet

Differential Revision: D8912691

fbshipit-source-id: 79840ef3322676deebed99391390d6c1796963b5
This commit is contained in:
David Aurelio
2018-07-19 09:51:25 -07:00
committed by Facebook Github Bot
parent f172d5d41c
commit f95e3b49e9
6 changed files with 28 additions and 61 deletions

View File

@@ -14,31 +14,32 @@
struct YGNode {
private:
void* context_;
YGPrintFunc print_;
bool hasNewLayout_;
YGNodeType nodeType_;
YGMeasureFunc measure_;
YGBaselineFunc baseline_;
YGDirtiedFunc dirtied_;
YGStyle style_;
YGLayout layout_;
uint32_t lineIndex_;
YGNodeRef owner_;
YGVector children_;
YGConfigRef config_;
bool isDirty_;
std::array<YGValue, 2> resolvedDimensions_;
void* context_ = nullptr;
YGPrintFunc print_ = nullptr;
bool hasNewLayout_ = true;
YGNodeType nodeType_ = YGNodeTypeDefault;
YGMeasureFunc measure_ = nullptr;
YGBaselineFunc baseline_ = nullptr;
YGDirtiedFunc dirtied_ = nullptr;
YGStyle style_ = {};
YGLayout layout_ = {};
uint32_t lineIndex_ = 0;
YGNodeRef owner_ = nullptr;
YGVector children_ = {};
YGConfigRef config_ = nullptr;
bool isDirty_ = false;
std::array<YGValue, 2> resolvedDimensions_ = {
{YGValueUndefined, YGValueUndefined}};
YGFloatOptional relativePosition(
const YGFlexDirection& axis,
const float& axisSize) const;
public:
YGNode();
~YGNode();
explicit YGNode(const YGConfigRef newConfig);
YGNode(const YGNode& node);
YGNode() = default;
~YGNode() = default; // cleanup of owner/children relationships in YGNodeFree
explicit YGNode(const YGConfigRef newConfig) : config_(newConfig){};
YGNode(const YGNode& node) = default;
YGNode& operator=(const YGNode& node);
// Getters