@@ -762,24 +762,6 @@ static const std::array<YGEdge, 4> pos = {{
762
762
static const std::array<YGDimension, 4 > dim = {
763
763
{YGDimensionHeight, YGDimensionHeight, YGDimensionWidth, YGDimensionWidth}};
764
764
765
- static float YGNodeLeadingPadding (const YGNodeRef node,
766
- const YGFlexDirection axis,
767
- const float widthSize) {
768
- if (YGFlexDirectionIsRow (axis) &&
769
- node->getStyle ().padding [YGEdgeStart].unit != YGUnitUndefined &&
770
- YGResolveValue (node->getStyle ().padding [YGEdgeStart], widthSize) >=
771
- 0 .0f ) {
772
- return YGResolveValue (node->getStyle ().padding [YGEdgeStart], widthSize);
773
- }
774
-
775
- return fmaxf (
776
- YGResolveValue (
777
- *YGComputedEdgeValue (
778
- node->getStyle ().padding , leading[axis], &YGValueZero),
779
- widthSize),
780
- 0 .0f );
781
- }
782
-
783
765
static float YGNodeTrailingPadding (const YGNodeRef node,
784
766
const YGFlexDirection axis,
785
767
const float widthSize) {
@@ -801,7 +783,7 @@ static inline float YGNodeLeadingPaddingAndBorder(
801
783
const YGNodeRef node,
802
784
const YGFlexDirection axis,
803
785
const float widthSize) {
804
- return YGNodeLeadingPadding ( node, axis, widthSize) +
786
+ return node-> getLeadingPadding ( axis, widthSize) +
805
787
node->getLeadingBorder (axis);
806
788
}
807
789
@@ -1757,11 +1739,11 @@ static void YGNodelayoutImpl(const YGNodeRef node,
1757
1739
node->getTrailingBorder (flexColumnDirection), YGEdgeBottom);
1758
1740
1759
1741
node->setLayoutPadding (
1760
- YGNodeLeadingPadding ( node, flexRowDirection, parentWidth), YGEdgeStart);
1742
+ node-> getLeadingPadding ( flexRowDirection, parentWidth), YGEdgeStart);
1761
1743
node->setLayoutPadding (
1762
1744
YGNodeTrailingPadding (node, flexRowDirection, parentWidth), YGEdgeEnd);
1763
1745
node->setLayoutPadding (
1764
- YGNodeLeadingPadding ( node, flexColumnDirection, parentWidth), YGEdgeTop);
1746
+ node-> getLeadingPadding ( flexColumnDirection, parentWidth), YGEdgeTop);
1765
1747
node->setLayoutPadding (
1766
1748
YGNodeTrailingPadding (node, flexColumnDirection, parentWidth),
1767
1749
YGEdgeBottom);
0 commit comments