From 1696fe897f74803380f567acf31434141df8ccf3 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 8 Aug 2019 00:20:48 -0700 Subject: [PATCH] Don't copy children in YGNodeComputeFlexBasisForChildren (#919) Summary: No need for a copy here. Pull Request resolved: https://github.com/facebook/yoga/pull/919 Differential Revision: D16701461 Pulled By: davidaurelio fbshipit-source-id: 3a90adbb2b5c43d5aefe693a8525aa3a37e53b3d --- Yoga.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Yoga.cpp b/Yoga.cpp index 73fb740..34629e9 100644 --- a/Yoga.cpp +++ b/Yoga.cpp @@ -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