diff --git a/yoga/YGLayout.h b/yoga/YGLayout.h index 46ca130d..ebd93433 100644 --- a/yoga/YGLayout.h +++ b/yoga/YGLayout.h @@ -1,10 +1,10 @@ -/** - * Copyright (c) 2014-present, Facebook, Inc. +/* + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the LICENSE + * file in the root directory of this source tree. * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. */ - #pragma once #include "YGFloatOptional.h" #include "Yoga-internal.h" diff --git a/yoga/YGNode.h b/yoga/YGNode.h index cba72163..b02c02cb 100644 --- a/yoga/YGNode.h +++ b/yoga/YGNode.h @@ -1,10 +1,10 @@ -/** - * Copyright (c) 2014-present, Facebook, Inc. +/* + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the LICENSE + * file in the root directory of this source tree. * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. */ - #pragma once #include #include "YGConfig.h" @@ -53,23 +53,23 @@ struct YGNode { bool getHasNewLayout() const { return hasNewLayout_; } - + YGNodeType getNodeType() const { return nodeType_; } - + YGMeasureFunc getMeasure() const { return measure_; } - + YGBaselineFunc getBaseline() const { return baseline_; } - + YGDirtiedFunc getDirtied() const { return dirtied_; } - + // For Performance reasons passing as reference. YGStyle& getStyle() { return style_; @@ -87,11 +87,11 @@ struct YGNode { const YGLayout& getLayout() const { return layout_; } - + uint32_t getLineIndex() const { return lineIndex_; } - + // returns the YGNodeRef that owns this YGNode. An owner is used to identify // the YogaTree that a YGNode belongs to. // This method will return the parent of the YGNode when a YGNode only belongs @@ -100,16 +100,16 @@ struct YGNode { YGNodeRef getOwner() const { return owner_; } - + // Deprecated, use getOwner() instead. YGNodeRef getParent() const { return getOwner(); } - + const YGVector& getChildren() const { return children_; } - + YGNodeRef getChild(uint32_t index) const { return children_.at(index); } @@ -117,21 +117,22 @@ struct YGNode { YGConfigRef getConfig() const { return config_; } - + bool isDirty() const { return isDirty_; } - + std::array getResolvedDimensions() const { return resolvedDimensions_; } - + YGValue getResolvedDimension(int index) const { return resolvedDimensions_[index]; } // Methods related to positions, margin, padding and border - YGFloatOptional getLeadingPosition(const YGFlexDirection& axis, + YGFloatOptional getLeadingPosition( + const YGFlexDirection& axis, const float& axisSize) const; bool isLeadingPositionDefined(const YGFlexDirection& axis) const; bool isTrailingPosDefined(const YGFlexDirection& axis) const; @@ -174,7 +175,7 @@ struct YGNode { void setHasNewLayout(bool hasNewLayout) { hasNewLayout_ = hasNewLayout; } - + void setNodeType(YGNodeType nodeType) { nodeType_ = nodeType; } @@ -200,15 +201,15 @@ struct YGNode { void setStyle(const YGStyle& style) { style_ = style; } - + void setLayout(const YGLayout& layout) { layout_ = layout; } - + void setLineIndex(uint32_t lineIndex) { lineIndex_ = lineIndex; } - + void setOwner(YGNodeRef owner) { owner_ = owner; } @@ -218,7 +219,7 @@ struct YGNode { } // TODO: rvalue override for setChildren - + void setConfig(YGConfigRef config) { config_ = config; } diff --git a/yoga/YGStyle.cpp b/yoga/YGStyle.cpp index 7664dcf8..738d36fb 100644 --- a/yoga/YGStyle.cpp +++ b/yoga/YGStyle.cpp @@ -1,10 +1,10 @@ -/** - * Copyright (c) 2014-present, Facebook, Inc. +/* + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the LICENSE + * file in the root directory of this source tree. * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. */ - #include "YGStyle.h" const YGValue kYGValueUndefined = {0, YGUnitUndefined}; diff --git a/yoga/YGStyle.h b/yoga/YGStyle.h index f0f97bd8..b18ac0a6 100644 --- a/yoga/YGStyle.h +++ b/yoga/YGStyle.h @@ -1,10 +1,10 @@ -/** - * Copyright (c) 2014-present, Facebook, Inc. +/* + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the LICENSE + * file in the root directory of this source tree. * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. */ - #pragma once #include "YGFloatOptional.h" #include "Yoga-internal.h"