Skip to content

Commit 69e87a4

Browse files
nlutsenkometa-codesync[bot]
authored andcommitted
clang-format | Format fbsource with clang-format 21.
Reviewed By: ChristianK275 Differential Revision: D85317706 fbshipit-source-id: b399c5c4b75252999442b7d7d2778e7a241b0025
1 parent 6617be1 commit 69e87a4

File tree

5 files changed

+35
-25
lines changed

5 files changed

+35
-25
lines changed

benchmark/YGBenchmark.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
(void)argv; \
2222
clock_t __start; \
2323
clock_t __endTimes[NUM_REPETITIONS]; \
24-
{ BLOCK } \
24+
{ \
25+
BLOCK \
26+
} \
2527
return 0; \
2628
}
2729

java/jni/YGJNIVanilla.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,9 @@ static void jni_YGNodeCopyStyleJNI(
454454
#define YG_NODE_JNI_STYLE_EDGE_UNIT_PROP(name) \
455455
static jlong jni_YGNodeStyleGet##name##JNI( \
456456
JNIEnv* /*env*/, jobject /*obj*/, jlong nativePointer, jint edge) { \
457-
return YogaValue::asJavaLong(YGNodeStyleGet##name( \
458-
_jlong2YGNodeRef(nativePointer), static_cast<YGEdge>(edge))); \
457+
return YogaValue::asJavaLong( \
458+
YGNodeStyleGet##name( \
459+
_jlong2YGNodeRef(nativePointer), static_cast<YGEdge>(edge))); \
459460
} \
460461
\
461462
static void jni_YGNodeStyleSet##name##JNI( \

tests/EventsTest.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,9 @@ void EventTest::listen(
332332
break;
333333
case Event::LayoutPassEnd: {
334334
auto& eventData = data.get<Event::LayoutPassEnd>();
335-
events.push_back(createArgs<Event::LayoutPassEnd>(
336-
node, data, {*eventData.layoutData}));
335+
events.push_back(
336+
createArgs<Event::LayoutPassEnd>(
337+
node, data, {*eventData.layoutData}));
337338
break;
338339
}
339340

tests/YGRoundingFunctionTest.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,18 @@ TEST(YogaTest, rounding_value) {
7070
ASSERT_FLOAT_EQ(-3, YGRoundValueToPixelGrid(-3, 1.0, false, true));
7171

7272
// NAN is treated as expected:
73-
ASSERT_TRUE(std::isnan(YGRoundValueToPixelGrid(
74-
std::numeric_limits<double>::quiet_NaN(), 1.5, false, false)));
75-
ASSERT_TRUE(std::isnan(YGRoundValueToPixelGrid(
76-
1.5, std::numeric_limits<double>::quiet_NaN(), false, false)));
77-
ASSERT_TRUE(std::isnan(YGRoundValueToPixelGrid(
78-
std::numeric_limits<double>::quiet_NaN(),
79-
std::numeric_limits<double>::quiet_NaN(),
80-
false,
81-
false)));
73+
ASSERT_TRUE(
74+
std::isnan(YGRoundValueToPixelGrid(
75+
std::numeric_limits<double>::quiet_NaN(), 1.5, false, false)));
76+
ASSERT_TRUE(
77+
std::isnan(YGRoundValueToPixelGrid(
78+
1.5, std::numeric_limits<double>::quiet_NaN(), false, false)));
79+
ASSERT_TRUE(
80+
std::isnan(YGRoundValueToPixelGrid(
81+
std::numeric_limits<double>::quiet_NaN(),
82+
std::numeric_limits<double>::quiet_NaN(),
83+
false,
84+
false)));
8285
}
8386

8487
static YGSize measureText(

yoga/algorithm/CalculateLayout.cpp

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,21 @@ static void computeFlexBasisForChild(
110110
FloatOptional(paddingAndBorderForAxis(
111111
child, FlexDirection::Row, direction, ownerWidth));
112112

113-
child->setLayoutComputedFlexBasis(yoga::maxOrDefined(
114-
child->getResolvedDimension(
115-
direction, Dimension::Width, ownerWidth, ownerWidth),
116-
paddingAndBorder));
113+
child->setLayoutComputedFlexBasis(
114+
yoga::maxOrDefined(
115+
child->getResolvedDimension(
116+
direction, Dimension::Width, ownerWidth, ownerWidth),
117+
paddingAndBorder));
117118
} else if (!isMainAxisRow && isColumnStyleDimDefined) {
118119
// The height is definite, so use that as the flex basis.
119120
const FloatOptional paddingAndBorder =
120121
FloatOptional(paddingAndBorderForAxis(
121122
child, FlexDirection::Column, direction, ownerWidth));
122-
child->setLayoutComputedFlexBasis(yoga::maxOrDefined(
123-
child->getResolvedDimension(
124-
direction, Dimension::Height, ownerHeight, ownerWidth),
125-
paddingAndBorder));
123+
child->setLayoutComputedFlexBasis(
124+
yoga::maxOrDefined(
125+
child->getResolvedDimension(
126+
direction, Dimension::Height, ownerHeight, ownerWidth),
127+
paddingAndBorder));
126128
} else {
127129
// Compute the flex basis and hypothetical main size (i.e. the clamped flex
128130
// basis).
@@ -253,9 +255,10 @@ static void computeFlexBasisForChild(
253255
depth,
254256
generationCount);
255257

256-
child->setLayoutComputedFlexBasis(FloatOptional(yoga::maxOrDefined(
257-
child->getLayout().measuredDimension(dimension(mainAxis)),
258-
paddingAndBorderForAxis(child, mainAxis, direction, ownerWidth))));
258+
child->setLayoutComputedFlexBasis(FloatOptional(
259+
yoga::maxOrDefined(
260+
child->getLayout().measuredDimension(dimension(mainAxis)),
261+
paddingAndBorderForAxis(child, mainAxis, direction, ownerWidth))));
259262
}
260263
child->setLayoutComputedFlexBasisGeneration(generationCount);
261264
}

0 commit comments

Comments
 (0)