Skip to content

Commit 35a78b8

Browse files
Devmate Botfacebook-github-bot
authored andcommitted
xplat/yoga/yoga/algorithm
Reviewed By: NickGerleman Differential Revision: D91560479
1 parent 1930529 commit 35a78b8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/react-native/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ static void computeFlexBasisForChild(
8484

8585
float childWidth = YGUndefined;
8686
float childHeight = YGUndefined;
87-
SizingMode childWidthSizingMode;
88-
SizingMode childHeightSizingMode;
87+
SizingMode childWidthSizingMode = SizingMode::MaxContent;
88+
SizingMode childHeightSizingMode = SizingMode::MaxContent;
8989

9090
const FloatOptional resolvedFlexBasis = child->resolveFlexBasis(
9191
direction, mainAxis, mainAxisOwnerSize, ownerWidth);
@@ -709,7 +709,7 @@ static float distributeFreeSpaceSecondPass(
709709

710710
float childCrossSize = YGUndefined;
711711
float childMainSize = updatedMainSize + marginMain;
712-
SizingMode childCrossSizingMode;
712+
SizingMode childCrossSizingMode = SizingMode::MaxContent;
713713
SizingMode childMainSizingMode = SizingMode::StretchFit;
714714

715715
const auto& childStyle = currentLineChild->style();
@@ -2330,7 +2330,7 @@ bool calculateLayoutInternal(
23302330

23312331
layout->generationCount = generationCount;
23322332

2333-
LayoutType layoutType;
2333+
LayoutType layoutType = LayoutType::kLayout;
23342334
if (performLayout) {
23352335
layoutType = !needToVisitNode && cachedResults == &layout->cachedLayout
23362336
? LayoutType::kCachedLayout

0 commit comments

Comments
 (0)