Use fbsource clang-format config
Summary: This mirrors the clang-format config used by fbsource to Yoga. They are pretty similar, except for an annoying habit where Yoga's previous forced small functions in headers to be a a single line, so you would get a combination of multiline and single line functions next to each other which are hard to read. That is what motivated this change. It also enforces header ordering (yay). I don't think we have any side-effect causing headers, so this should be safe. Reviewed By: yungsters Differential Revision: D49248994 fbshipit-source-id: 66998395e7c0158ff9d9fb1bee44e8401bdd8f21
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9d21e3e300
commit
f9c2c27d33
@@ -27,7 +27,7 @@ static YGSize _measure(
|
||||
float height,
|
||||
YGMeasureMode heightMode) {
|
||||
struct _MeasureConstraintList* constraintList =
|
||||
(struct _MeasureConstraintList*) YGNodeGetContext(node);
|
||||
(struct _MeasureConstraintList*)YGNodeGetContext(node);
|
||||
struct _MeasureConstraint* constraints = constraintList->constraints;
|
||||
uint32_t currentIndex = constraintList->length;
|
||||
(&constraints[currentIndex])->width = width;
|
||||
@@ -45,7 +45,7 @@ static YGSize _measure(
|
||||
TEST(YogaTest, exactly_measure_stretched_child_column) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
0,
|
||||
(struct _MeasureConstraint*) malloc(
|
||||
(struct _MeasureConstraint*)malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
@@ -72,7 +72,7 @@ TEST(YogaTest, exactly_measure_stretched_child_column) {
|
||||
TEST(YogaTest, exactly_measure_stretched_child_row) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
0,
|
||||
(struct _MeasureConstraint*) malloc(
|
||||
(struct _MeasureConstraint*)malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
@@ -100,7 +100,7 @@ TEST(YogaTest, exactly_measure_stretched_child_row) {
|
||||
TEST(YogaTest, at_most_main_axis_column) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
0,
|
||||
(struct _MeasureConstraint*) malloc(
|
||||
(struct _MeasureConstraint*)malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
@@ -127,7 +127,7 @@ TEST(YogaTest, at_most_main_axis_column) {
|
||||
TEST(YogaTest, at_most_cross_axis_column) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
0,
|
||||
(struct _MeasureConstraint*) malloc(
|
||||
(struct _MeasureConstraint*)malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
@@ -155,7 +155,7 @@ TEST(YogaTest, at_most_cross_axis_column) {
|
||||
TEST(YogaTest, at_most_main_axis_row) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
0,
|
||||
(struct _MeasureConstraint*) malloc(
|
||||
(struct _MeasureConstraint*)malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
@@ -183,7 +183,7 @@ TEST(YogaTest, at_most_main_axis_row) {
|
||||
TEST(YogaTest, at_most_cross_axis_row) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
0,
|
||||
(struct _MeasureConstraint*) malloc(
|
||||
(struct _MeasureConstraint*)malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
@@ -212,7 +212,7 @@ TEST(YogaTest, at_most_cross_axis_row) {
|
||||
TEST(YogaTest, flex_child) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
0,
|
||||
(struct _MeasureConstraint*) malloc(
|
||||
(struct _MeasureConstraint*)malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
@@ -242,7 +242,7 @@ TEST(YogaTest, flex_child) {
|
||||
TEST(YogaTest, flex_child_with_flex_basis) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
0,
|
||||
(struct _MeasureConstraint*) malloc(
|
||||
(struct _MeasureConstraint*)malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
@@ -270,7 +270,7 @@ TEST(YogaTest, flex_child_with_flex_basis) {
|
||||
TEST(YogaTest, overflow_scroll_column) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
0,
|
||||
(struct _MeasureConstraint*) malloc(
|
||||
(struct _MeasureConstraint*)malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
@@ -302,7 +302,7 @@ TEST(YogaTest, overflow_scroll_column) {
|
||||
TEST(YogaTest, overflow_scroll_row) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
0,
|
||||
(struct _MeasureConstraint*) malloc(
|
||||
(struct _MeasureConstraint*)malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user