Apply clang-format update fixes

Reviewed By: igorsugak

Differential Revision: D25861849

fbshipit-source-id: 840dc1061e557717c7f9ffcccbc09c24b96b78e0
This commit is contained in:
Andres Suarez
2021-01-10 10:03:53 -08:00
committed by Facebook GitHub Bot
parent a38ec3d7a4
commit 584dfe961e
8 changed files with 57 additions and 50 deletions

View File

@@ -28,17 +28,19 @@
UIView* child2 = [UIView new];
child2.backgroundColor = [UIColor greenColor];
child2.frame = (CGRect){.size = {
.width = 200,
.height = 100,
}};
child2.frame = (CGRect){
.size = {
.width = 200,
.height = 100,
}};
UIView* child3 = [UIView new];
child3.backgroundColor = [UIColor yellowColor];
child3.frame = (CGRect){.size = {
.width = 100,
.height = 100,
}};
child3.frame = (CGRect){
.size = {
.width = 100,
.height = 100,
}};
[child2 addSubview:child3];
[root addSubview:child1];

View File

@@ -23,8 +23,8 @@ static YGSize globalMeasureFunc(
Node const& node = *reinterpret_cast<Node const*>(YGNodeGetContext(nodeRef));
Size size = node.callMeasureFunc(width, widthMode, height, heightMode);
YGSize ygSize = {static_cast<float>(size.width),
static_cast<float>(size.height)};
YGSize ygSize = {
static_cast<float>(size.width), static_cast<float>(size.height)};
return ygSize;
}

View File

@@ -303,8 +303,8 @@ EventArgs createArgs(
};
EventArgs args = createArgs<E>(node, data);
args.eventTestDataPtr = {new EventTestData{eventTestData},
deleteEventTestData};
args.eventTestDataPtr = {
new EventTestData{eventTestData}, deleteEventTestData};
return args;
}

View File

@@ -29,12 +29,13 @@ TEST(YogaTest, computed_layout_margin) {
}
TEST(YogaTest, margin_side_overrides_horizontal_and_vertical) {
const std::array<YGEdge, 6> edges = {{YGEdgeTop,
YGEdgeBottom,
YGEdgeStart,
YGEdgeEnd,
YGEdgeLeft,
YGEdgeRight}};
const std::array<YGEdge, 6> edges = {
{YGEdgeTop,
YGEdgeBottom,
YGEdgeStart,
YGEdgeEnd,
YGEdgeLeft,
YGEdgeRight}};
for (float edgeValue = 0; edgeValue < 2; ++edgeValue) {
for (const auto& edge : edges) {
@@ -58,12 +59,13 @@ TEST(YogaTest, margin_side_overrides_horizontal_and_vertical) {
}
TEST(YogaTest, margin_side_overrides_all) {
const std::array<YGEdge, 6> edges = {{YGEdgeTop,
YGEdgeBottom,
YGEdgeStart,
YGEdgeEnd,
YGEdgeLeft,
YGEdgeRight}};
const std::array<YGEdge, 6> edges = {
{YGEdgeTop,
YGEdgeBottom,
YGEdgeStart,
YGEdgeEnd,
YGEdgeLeft,
YGEdgeRight}};
for (float edgeValue = 0; edgeValue < 2; ++edgeValue) {
for (const auto& edge : edges) {

View File

@@ -29,12 +29,13 @@ TEST(YogaTest, computed_layout_padding) {
}
TEST(YogaTest, padding_side_overrides_horizontal_and_vertical) {
const std::array<YGEdge, 6> edges = {{YGEdgeTop,
YGEdgeBottom,
YGEdgeStart,
YGEdgeEnd,
YGEdgeLeft,
YGEdgeRight}};
const std::array<YGEdge, 6> edges = {
{YGEdgeTop,
YGEdgeBottom,
YGEdgeStart,
YGEdgeEnd,
YGEdgeLeft,
YGEdgeRight}};
for (float edgeValue = 0; edgeValue < 2; ++edgeValue) {
for (const auto& edge : edges) {
@@ -58,12 +59,13 @@ TEST(YogaTest, padding_side_overrides_horizontal_and_vertical) {
}
TEST(YogaTest, padding_side_overrides_all) {
const std::array<YGEdge, 6> edges = {{YGEdgeTop,
YGEdgeBottom,
YGEdgeStart,
YGEdgeEnd,
YGEdgeLeft,
YGEdgeRight}};
const std::array<YGEdge, 6> edges = {
{YGEdgeTop,
YGEdgeBottom,
YGEdgeStart,
YGEdgeEnd,
YGEdgeLeft,
YGEdgeRight}};
for (float edgeValue = 0; edgeValue < 2; ++edgeValue) {
for (const auto& edge : edges) {

View File

@@ -29,8 +29,8 @@ TEST(YogaTest, set_children_adds_children_to_parent) {
const std::vector<YGNodeRef> expectedChildren = {root_child0, root_child1};
ASSERT_EQ(children, expectedChildren);
const std::vector<YGNodeRef> owners = {YGNodeGetOwner(root_child0),
YGNodeGetOwner(root_child1)};
const std::vector<YGNodeRef> owners = {
YGNodeGetOwner(root_child0), YGNodeGetOwner(root_child1)};
const std::vector<YGNodeRef> expectedOwners = {root, root};
ASSERT_EQ(owners, expectedOwners);
@@ -49,8 +49,8 @@ TEST(YogaTest, set_children_to_empty_removes_old_children) {
const std::vector<YGNodeRef> expectedChildren = {};
ASSERT_EQ(children, expectedChildren);
const std::vector<YGNodeRef> owners = {YGNodeGetOwner(root_child0),
YGNodeGetOwner(root_child1)};
const std::vector<YGNodeRef> owners = {
YGNodeGetOwner(root_child0), YGNodeGetOwner(root_child1)};
const std::vector<YGNodeRef> expectedOwners = {nullptr, nullptr};
ASSERT_EQ(owners, expectedOwners);
@@ -73,8 +73,8 @@ TEST(YogaTest, set_children_replaces_non_common_children) {
const std::vector<YGNodeRef> expectedChildren = {root_child2, root_child3};
ASSERT_EQ(children, expectedChildren);
const std::vector<YGNodeRef> owners = {YGNodeGetOwner(root_child0),
YGNodeGetOwner(root_child1)};
const std::vector<YGNodeRef> owners = {
YGNodeGetOwner(root_child0), YGNodeGetOwner(root_child1)};
const std::vector<YGNodeRef> expectedOwners = {nullptr, nullptr};
ASSERT_EQ(owners, expectedOwners);
@@ -100,10 +100,11 @@ TEST(YogaTest, set_children_keeps_and_reorders_common_children) {
root_child2, root_child1, root_child3};
ASSERT_EQ(children, expectedChildren);
const std::vector<YGNodeRef> owners = {YGNodeGetOwner(root_child0),
YGNodeGetOwner(root_child1),
YGNodeGetOwner(root_child2),
YGNodeGetOwner(root_child3)};
const std::vector<YGNodeRef> owners = {
YGNodeGetOwner(root_child0),
YGNodeGetOwner(root_child1),
YGNodeGetOwner(root_child2),
YGNodeGetOwner(root_child3)};
const std::vector<YGNodeRef> expectedOwners = {nullptr, root, root, root};
ASSERT_EQ(owners, expectedOwners);

View File

@@ -125,8 +125,8 @@ public:
data.repr &= ~PERCENT_BIT;
data.repr += BIAS;
return YGValue{data.value,
payload_.repr & 0x40000000 ? YGUnitPercent : YGUnitPoint};
return YGValue{
data.value, payload_.repr & 0x40000000 ? YGUnitPercent : YGUnitPoint};
}
bool isUndefined() const noexcept {

View File

@@ -3531,8 +3531,8 @@ static void YGNodelayoutImpl(
YGNodeBoundAxisWithinMinAndMax(
node,
crossAxis,
YGFloatOptional{totalLineCrossDim +
paddingAndBorderAxisCross},
YGFloatOptional{
totalLineCrossDim + paddingAndBorderAxisCross},
crossAxisownerSize)
.unwrap()),
paddingAndBorderAxisCross),