Skip to content

Commit 6d49d24

Browse files
Adlai-Hollertobster-de
authored andcommitted
Don't copy children in YGNodeComputeFlexBasisForChildren (facebook#919)
Summary: No need for a copy here. Pull Request resolved: facebook#919 Differential Revision: D16701461 Pulled By: davidaurelio fbshipit-source-id: 3a90adbb2b5c43d5aefe693a8525aa3a37e53b3d
1 parent be13504 commit 6d49d24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

yoga/Yoga.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1850,7 +1850,7 @@ static float YGNodeComputeFlexBasisForChildren(
18501850
const uint32_t generationCount) {
18511851
float totalOuterFlexBasis = 0.0f;
18521852
YGNodeRef singleFlexChild = nullptr;
1853-
YGVector children = node->getChildren();
1853+
const YGVector &children = node->getChildren();
18541854
YGMeasureMode measureModeMainDim =
18551855
YGFlexDirectionIsRow(mainAxis) ? widthMeasureMode : heightMeasureMode;
18561856
// If there is only one child with flexGrow + flexShrink it means we can set

0 commit comments

Comments
 (0)