From 87105e53cdd67e1c081c35a480cd766514372d78 Mon Sep 17 00:00:00 2001 From: Joe Vilches Date: Mon, 30 Sep 2024 15:17:13 -0700 Subject: [PATCH] Clean up calls to dimension() with a hardcoded FlexDirection Summary: This is a bit more clear, imo Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D63408245 --- .../ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp b/packages/react-native/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp index d68b11cf169cdd..43f797c0377f5c 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp +++ b/packages/react-native/ReactCommon/yoga/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));