From 8f841b11826284722200a8ff42839a2da6876930 Mon Sep 17 00:00:00 2001 From: Joe Vilches Date: Tue, 26 Nov 2024 14:42:36 -0800 Subject: [PATCH 1/2] Camel case LengthValue in Node.cpp (#1754) Summary: X-link: https://github.com/facebook/react-native/pull/47971 This was annoying me Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D66510734 --- yoga/node/Node.cpp | 4 ++-- yoga/node/Node.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/yoga/node/Node.cpp b/yoga/node/Node.cpp index cf36ab09a4..1bb5e8aad0 100644 --- a/yoga/node/Node.cpp +++ b/yoga/node/Node.cpp @@ -245,8 +245,8 @@ void Node::setLayoutHadOverflow(bool hadOverflow) { layout_.setHadOverflow(hadOverflow); } -void Node::setLayoutDimension(float LengthValue, Dimension dimension) { - layout_.setDimension(dimension, LengthValue); +void Node::setLayoutDimension(float lengthValue, Dimension dimension) { + layout_.setDimension(dimension, lengthValue); } // If both left and right are defined, then use left. Otherwise return +left or diff --git a/yoga/node/Node.h b/yoga/node/Node.h index d596c564cf..a36e3e6882 100644 --- a/yoga/node/Node.h +++ b/yoga/node/Node.h @@ -259,7 +259,7 @@ class YG_EXPORT Node : public ::YGNode { uint32_t computedFlexBasisGeneration); void setLayoutMeasuredDimension(float measuredDimension, Dimension dimension); void setLayoutHadOverflow(bool hadOverflow); - void setLayoutDimension(float LengthValue, Dimension dimension); + void setLayoutDimension(float lengthValue, Dimension dimension); void setLayoutDirection(Direction direction); void setLayoutMargin(float margin, PhysicalEdge edge); void setLayoutBorder(float border, PhysicalEdge edge); From eda343a44d19aede55fc691d90751cc72930b7dd Mon Sep 17 00:00:00 2001 From: Joe Vilches Date: Tue, 26 Nov 2024 14:42:36 -0800 Subject: [PATCH 2/2] Align order of params between calculateLayoutInternal and calculateLayoutImpl Summary: I've been working with callsites here and its annoying if you switch these that you need to move these params around too. Let's just make them the same order Changelog: [Internal] Differential Revision: D66519836 --- yoga/algorithm/CalculateLayout.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yoga/algorithm/CalculateLayout.cpp b/yoga/algorithm/CalculateLayout.cpp index a10b22151c..f9e6f6e8f5 100644 --- a/yoga/algorithm/CalculateLayout.cpp +++ b/yoga/algorithm/CalculateLayout.cpp @@ -1213,10 +1213,10 @@ static void calculateLayoutImpl( const float ownerWidth, const float ownerHeight, const bool performLayout, + const LayoutPassReason reason, LayoutData& layoutMarkerData, const uint32_t depth, - const uint32_t generationCount, - const LayoutPassReason reason) { + const uint32_t generationCount) { yoga::assertFatalWithNode( node, yoga::isUndefined(availableWidth) @@ -2268,10 +2268,10 @@ bool calculateLayoutInternal( ownerWidth, ownerHeight, performLayout, + reason, layoutMarkerData, depth, - generationCount, - reason); + generationCount); layout->lastOwnerDirection = ownerDirection; layout->configVersion = node->getConfig()->getVersion();