From b7cfdf71620367590fcb9f0e307227153747a9a3 Mon Sep 17 00:00:00 2001 From: Joe Vilches Date: Mon, 30 Sep 2024 13:28:10 -0700 Subject: [PATCH] Clean up calls to dimension() with a hardcoded FlexDirection Differential Revision: D63408245 --- yoga/algorithm/CalculateLayout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yoga/algorithm/CalculateLayout.cpp b/yoga/algorithm/CalculateLayout.cpp index d68b11cf..43f797c0 100644 --- a/yoga/algorithm/CalculateLayout.cpp +++ b/yoga/algorithm/CalculateLayout.cpp @@ -2360,7 +2360,7 @@ void calculateLayout( const auto& style = node->style(); if (node->hasDefiniteLength(Dimension::Width, ownerWidth)) { width = - (node->getProcessedDimension(dimension(FlexDirection::Row)) + (node->getProcessedDimension(Dimension::Width) .resolve(ownerWidth) .unwrap() + node->style().computeMarginForAxis(FlexDirection::Row, ownerWidth)); @@ -2380,7 +2380,7 @@ void calculateLayout( SizingMode heightSizingMode = SizingMode::MaxContent; if (node->hasDefiniteLength(Dimension::Height, ownerHeight)) { height = - (node->getProcessedDimension(dimension(FlexDirection::Column)) + (node->getProcessedDimension(Dimension::Height) .resolve(ownerHeight) .unwrap() + node->style().computeMarginForAxis(FlexDirection::Column, ownerWidth));