From b74c0d476657bb9f4a76d2253a9cc74c15c4979a Mon Sep 17 00:00:00 2001 From: David Aurelio Date: Wed, 22 May 2019 09:39:28 -0700 Subject: [PATCH] Remove comparison to `YGUndefined` *and* `0.0f` Summary: Removes a check introduced in D6969537, comparing `totalFlexGrowFactors` and `resolveFlexGrow` to both `0.0` *and* undefined. Reviewed By: SidharthGuglani Differential Revision: D15431425 fbshipit-source-id: 13c8f24e1bc8c49496097a6aa78e20ee5d3964a7 --- yoga/Yoga.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/yoga/Yoga.cpp b/yoga/Yoga.cpp index c4544ed9..93ad4148 100644 --- a/yoga/Yoga.cpp +++ b/yoga/Yoga.cpp @@ -2859,11 +2859,8 @@ static void YGNodelayoutImpl( availableInnerMainDim = maxInnerMainDim; } else { if (!node->getConfig()->useLegacyStretchBehaviour && - ((YGFloatIsUndefined( - collectedFlexItemsValues.totalFlexGrowFactors) && - collectedFlexItemsValues.totalFlexGrowFactors == 0) || - (YGFloatIsUndefined(node->resolveFlexGrow()) && - node->resolveFlexGrow() == 0))) { + (collectedFlexItemsValues.totalFlexGrowFactors == 0 || + node->resolveFlexGrow() == 0)) { // If we don't have any children to flex or we can't flex the node // itself, space we've used is all space we need. Root node also // should be shrunk to minimum