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:
David Aurelio
2019-03-25 05:37:36 -07:00
committed by Facebook Github Bot
parent 7d7b7b9e18
commit 85352c4e45
66 changed files with 833 additions and 917 deletions

View File

@@ -8,12 +8,13 @@
#include <yoga/YGNode.h>
#include <yoga/Yoga.h>
static YGSize _measureMax(YGNodeRef node,
float width,
YGMeasureMode widthMode,
float height,
YGMeasureMode heightMode) {
int* measureCount = (int*)node->getContext();
static YGSize _measureMax(
YGNodeRef node,
float width,
YGMeasureMode widthMode,
float height,
YGMeasureMode heightMode) {
int* measureCount = (int*) node->getContext();
(*measureCount)++;
return YGSize{
@@ -22,37 +23,40 @@ static YGSize _measureMax(YGNodeRef node,
};
}
static YGSize _measureMin(YGNodeRef node,
float width,
YGMeasureMode widthMode,
float height,
YGMeasureMode heightMode) {
int* measureCount = (int*)node->getContext();
static YGSize _measureMin(
YGNodeRef node,
float width,
YGMeasureMode widthMode,
float height,
YGMeasureMode heightMode) {
int* measureCount = (int*) node->getContext();
*measureCount = *measureCount + 1;
return YGSize{
.width =
widthMode == YGMeasureModeUndefined || (widthMode == YGMeasureModeAtMost && width > 10)
? 10
: width,
.height =
heightMode == YGMeasureModeUndefined || (heightMode == YGMeasureModeAtMost && height > 10)
? 10
: height,
.width = widthMode == YGMeasureModeUndefined ||
(widthMode == YGMeasureModeAtMost && width > 10)
? 10
: width,
.height = heightMode == YGMeasureModeUndefined ||
(heightMode == YGMeasureModeAtMost && height > 10)
? 10
: height,
};
}
static YGSize _measure_84_49(YGNodeRef node,
float width,
YGMeasureMode widthMode,
float height,
YGMeasureMode heightMode) {
int* measureCount = (int*)node->getContext();
static YGSize _measure_84_49(
YGNodeRef node,
float width,
YGMeasureMode widthMode,
float height,
YGMeasureMode heightMode) {
int* measureCount = (int*) node->getContext();
if (measureCount) {
(*measureCount)++;
}
return YGSize{
.width = 84.f, .height = 49.f,
.width = 84.f,
.height = 49.f,
};
}
@@ -149,7 +153,9 @@ TEST(YogaTest, remeasure_with_atmost_computed_width_undefined_height) {
YGNodeFreeRecursive(root);
}
TEST(YogaTest, remeasure_with_already_measured_value_smaller_but_still_float_equal) {
TEST(
YogaTest,
remeasure_with_already_measured_value_smaller_but_still_float_equal) {
int measureCount = 0;
const YGNodeRef root = YGNodeNew();