Skip to content

Commit

Permalink
Don't copy children in YGNodeComputeFlexBasisForChildren (#919)
Browse files Browse the repository at this point in the history
Summary:
No need for a copy here.
Pull Request resolved: facebook/yoga#919

Differential Revision: D16701461

Pulled By: davidaurelio

fbshipit-source-id: 3a90adbb2b5c43d5aefe693a8525aa3a37e53b3d
  • Loading branch information
Adlai-Holler authored and facebook-github-bot committed Aug 8, 2019
1 parent c9b757f commit 4c11b55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ReactCommon/yoga/yoga/Yoga.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1850,7 +1850,7 @@ static float YGNodeComputeFlexBasisForChildren(
const uint32_t generationCount) {
float totalOuterFlexBasis = 0.0f;
YGNodeRef singleFlexChild = nullptr;
YGVector children = node->getChildren();
const YGVector &children = node->getChildren();
YGMeasureMode measureModeMainDim =
YGFlexDirectionIsRow(mainAxis) ? widthMeasureMode : heightMeasureMode;
// If there is only one child with flexGrow + flexShrink it means we can set
Expand Down

0 comments on commit 4c11b55

Please sign in to comment.