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:
Nick Gerleman
2023-09-13 20:12:55 -07:00
committed by Facebook GitHub Bot
parent 9d21e3e300
commit f9c2c27d33
51 changed files with 522 additions and 470 deletions

View File

@@ -71,10 +71,8 @@ YG_EXPORT YGNodeRef YGNodeGetChild(YGNodeRef node, size_t index);
YG_EXPORT YGNodeRef YGNodeGetOwner(YGNodeRef node);
YG_EXPORT YGNodeRef YGNodeGetParent(YGNodeRef node);
YG_EXPORT size_t YGNodeGetChildCount(YGNodeConstRef node);
YG_EXPORT void YGNodeSetChildren(
YGNodeRef owner,
const YGNodeRef* children,
size_t count);
YG_EXPORT void
YGNodeSetChildren(YGNodeRef owner, const YGNodeRef* children, size_t count);
YG_EXPORT void YGNodeSetIsReferenceBaseline(
YGNodeRef node,
@@ -197,41 +195,29 @@ YG_EXPORT void YGNodeStyleSetFlexBasisPercent(YGNodeRef node, float flexBasis);
YG_EXPORT void YGNodeStyleSetFlexBasisAuto(YGNodeRef node);
YG_EXPORT YGValue YGNodeStyleGetFlexBasis(YGNodeConstRef node);
YG_EXPORT void YGNodeStyleSetPosition(
YGNodeRef node,
YGEdge edge,
float position);
YG_EXPORT void YGNodeStyleSetPositionPercent(
YGNodeRef node,
YGEdge edge,
float position);
YG_EXPORT void
YGNodeStyleSetPosition(YGNodeRef node, YGEdge edge, float position);
YG_EXPORT void
YGNodeStyleSetPositionPercent(YGNodeRef node, YGEdge edge, float position);
YG_EXPORT YGValue YGNodeStyleGetPosition(YGNodeConstRef node, YGEdge edge);
YG_EXPORT void YGNodeStyleSetMargin(YGNodeRef node, YGEdge edge, float margin);
YG_EXPORT void YGNodeStyleSetMarginPercent(
YGNodeRef node,
YGEdge edge,
float margin);
YG_EXPORT void
YGNodeStyleSetMarginPercent(YGNodeRef node, YGEdge edge, float margin);
YG_EXPORT void YGNodeStyleSetMarginAuto(YGNodeRef node, YGEdge edge);
YG_EXPORT YGValue YGNodeStyleGetMargin(YGNodeConstRef node, YGEdge edge);
YG_EXPORT void YGNodeStyleSetPadding(
YGNodeRef node,
YGEdge edge,
float padding);
YG_EXPORT void YGNodeStyleSetPaddingPercent(
YGNodeRef node,
YGEdge edge,
float padding);
YG_EXPORT void
YGNodeStyleSetPadding(YGNodeRef node, YGEdge edge, float padding);
YG_EXPORT void
YGNodeStyleSetPaddingPercent(YGNodeRef node, YGEdge edge, float padding);
YG_EXPORT YGValue YGNodeStyleGetPadding(YGNodeConstRef node, YGEdge edge);
YG_EXPORT void YGNodeStyleSetBorder(YGNodeRef node, YGEdge edge, float border);
YG_EXPORT float YGNodeStyleGetBorder(YGNodeConstRef node, YGEdge edge);
YG_EXPORT void YGNodeStyleSetGap(
YGNodeRef node,
YGGutter gutter,
float gapLength);
YG_EXPORT void
YGNodeStyleSetGap(YGNodeRef node, YGGutter gutter, float gapLength);
YG_EXPORT float YGNodeStyleGetGap(YGNodeConstRef node, YGGutter gutter);
YG_EXPORT void YGNodeStyleSetWidth(YGNodeRef node, float width);