From df917b3de5c03031b16f553341e94af59450c0ed Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Tue, 23 Jul 2019 14:03:17 -0700 Subject: [PATCH] Don't copy children in YGNodeComputeFlexBasisForChildren --- yoga/Yoga.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yoga/Yoga.cpp b/yoga/Yoga.cpp index e87fa32516..7f04b8a411 100644 --- a/yoga/Yoga.cpp +++ b/yoga/Yoga.cpp @@ -1853,7 +1853,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