Skip to content

Commit 99a8fcd

Browse files
Adlai-Hollerfacebook-github-bot
authored andcommitted
Don't copy children in YGNodeComputeFlexBasisForChildren (#919)
Summary: No need for a copy here. Pull Request resolved: facebook/yoga#919 Differential Revision: D16701461 Pulled By: davidaurelio fbshipit-source-id: 3a90adbb2b5c43d5aefe693a8525aa3a37e53b3d
1 parent e084e59 commit 99a8fcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/yoga/src/main/cpp/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)