Automatic lint fixes
Summary: @public A round of automatic lint fixes. Reviewed By: SidharthGuglani Differential Revision: D14590396 fbshipit-source-id: f0b4a0ce503a1d9d46ea7ae788f9f2eac09c2ac7
This commit is contained in:
committed by
Facebook Github Bot
parent
7d7b7b9e18
commit
85352c4e45
@@ -17,17 +17,18 @@ struct _MeasureConstraint {
|
||||
|
||||
struct _MeasureConstraintList {
|
||||
uint32_t length;
|
||||
struct _MeasureConstraint *constraints;
|
||||
struct _MeasureConstraint* constraints;
|
||||
};
|
||||
|
||||
static YGSize _measure(YGNodeRef node,
|
||||
float width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGMeasureMode heightMode) {
|
||||
static YGSize _measure(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGMeasureMode heightMode) {
|
||||
struct _MeasureConstraintList* constraintList =
|
||||
(struct _MeasureConstraintList*)node->getContext();
|
||||
struct _MeasureConstraint *constraints = constraintList->constraints;
|
||||
(struct _MeasureConstraintList*) node->getContext();
|
||||
struct _MeasureConstraint* constraints = constraintList->constraints;
|
||||
uint32_t currentIndex = constraintList->length;
|
||||
(&constraints[currentIndex])->width = width;
|
||||
(&constraints[currentIndex])->widthMode = widthMode;
|
||||
@@ -44,7 +45,8 @@ static YGSize _measure(YGNodeRef node,
|
||||
TEST(YogaTest, exactly_measure_stretched_child_column) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
.length = 0,
|
||||
.constraints = (struct _MeasureConstraint *) malloc(10 * sizeof(struct _MeasureConstraint)),
|
||||
.constraints = (struct _MeasureConstraint*) malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
@@ -72,7 +74,8 @@ TEST(YogaTest, exactly_measure_stretched_child_column) {
|
||||
TEST(YogaTest, exactly_measure_stretched_child_row) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
.length = 0,
|
||||
.constraints = (struct _MeasureConstraint *) malloc(10 * sizeof(struct _MeasureConstraint)),
|
||||
.constraints = (struct _MeasureConstraint*) malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
@@ -100,7 +103,8 @@ TEST(YogaTest, exactly_measure_stretched_child_row) {
|
||||
TEST(YogaTest, at_most_main_axis_column) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
.length = 0,
|
||||
.constraints = (struct _MeasureConstraint *) malloc(10 * sizeof(struct _MeasureConstraint)),
|
||||
.constraints = (struct _MeasureConstraint*) malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
@@ -126,7 +130,8 @@ TEST(YogaTest, at_most_main_axis_column) {
|
||||
TEST(YogaTest, at_most_cross_axis_column) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
.length = 0,
|
||||
.constraints = (struct _MeasureConstraint *) malloc(10 * sizeof(struct _MeasureConstraint)),
|
||||
.constraints = (struct _MeasureConstraint*) malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
@@ -153,7 +158,8 @@ TEST(YogaTest, at_most_cross_axis_column) {
|
||||
TEST(YogaTest, at_most_main_axis_row) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
.length = 0,
|
||||
.constraints = (struct _MeasureConstraint *) malloc(10 * sizeof(struct _MeasureConstraint)),
|
||||
.constraints = (struct _MeasureConstraint*) malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
@@ -180,7 +186,8 @@ TEST(YogaTest, at_most_main_axis_row) {
|
||||
TEST(YogaTest, at_most_cross_axis_row) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
.length = 0,
|
||||
.constraints = (struct _MeasureConstraint *) malloc(10 * sizeof(struct _MeasureConstraint)),
|
||||
.constraints = (struct _MeasureConstraint*) malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
@@ -208,7 +215,8 @@ TEST(YogaTest, at_most_cross_axis_row) {
|
||||
TEST(YogaTest, flex_child) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
.length = 0,
|
||||
.constraints = (struct _MeasureConstraint *) malloc(10 * sizeof(struct _MeasureConstraint)),
|
||||
.constraints = (struct _MeasureConstraint*) malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
@@ -237,7 +245,8 @@ TEST(YogaTest, flex_child) {
|
||||
TEST(YogaTest, flex_child_with_flex_basis) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
.length = 0,
|
||||
.constraints = (struct _MeasureConstraint *) malloc(10 * sizeof(struct _MeasureConstraint)),
|
||||
.constraints = (struct _MeasureConstraint*) malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
@@ -264,7 +273,8 @@ TEST(YogaTest, flex_child_with_flex_basis) {
|
||||
TEST(YogaTest, overflow_scroll_column) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
.length = 0,
|
||||
.constraints = (struct _MeasureConstraint *) malloc(10 * sizeof(struct _MeasureConstraint)),
|
||||
.constraints = (struct _MeasureConstraint*) malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
@@ -295,7 +305,8 @@ TEST(YogaTest, overflow_scroll_column) {
|
||||
TEST(YogaTest, overflow_scroll_row) {
|
||||
struct _MeasureConstraintList constraintList = _MeasureConstraintList{
|
||||
.length = 0,
|
||||
.constraints = (struct _MeasureConstraint *) malloc(10 * sizeof(struct _MeasureConstraint)),
|
||||
.constraints = (struct _MeasureConstraint*) malloc(
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
|
Reference in New Issue
Block a user