Update clang-format rules

Summary: Spent a couple hours customizing the clang-format rules to better match the desired code style.

Reviewed By: IanChilds

Differential Revision: D3714510

fbshipit-source-id: f6d0436346416aab023aacbedd70ea189e583e8d
This commit is contained in:
Emil Sjolander
2016-08-15 09:15:02 -07:00
committed by Facebook Github Bot 6
parent 6a44dbc43b
commit 7a1e353404
10 changed files with 602 additions and 460 deletions

View File

@@ -11,9 +11,9 @@
#include <assert.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#ifndef __cplusplus
#include <stdbool.h>
@@ -21,8 +21,8 @@
// Not defined in MSVC++
#ifndef NAN
static const unsigned long __nan[2] = { 0xffffffff, 0x7fffffff };
#define NAN (*(const float *)__nan)
static const unsigned long __nan[2] = {0xffffffff, 0x7fffffff};
#define NAN (*(const float *) __nan)
#endif
#define CSSUndefined NAN
@@ -113,8 +113,11 @@ typedef struct CSSSize {
} CSSSize;
typedef struct CSSNode *CSSNodeRef;
typedef CSSSize (*CSSMeasureFunc)(
void *context, float width, CSSMeasureMode widthMode, float height, CSSMeasureMode heightMode);
typedef CSSSize (*CSSMeasureFunc)(void *context,
float width,
CSSMeasureMode widthMode,
float height,
CSSMeasureMode heightMode);
typedef void (*CSSPrintFunc)(void *context);
// CSSNode
@@ -127,8 +130,10 @@ void CSSNodeRemoveChild(CSSNodeRef node, CSSNodeRef child);
CSSNodeRef CSSNodeGetChild(CSSNodeRef node, uint32_t index);
uint32_t CSSNodeChildCount(CSSNodeRef node);
void CSSNodeCalculateLayout(
CSSNodeRef node, float availableWidth, float availableHeight, CSSDirection parentDirection);
void CSSNodeCalculateLayout(CSSNodeRef node,
float availableWidth,
float availableHeight,
CSSDirection parentDirection);
// Mark a node as dirty. Only valid for nodes with a custom measure function
// set.
@@ -143,12 +148,12 @@ void CSSNodePrint(CSSNodeRef node, CSSPrintOptions options);
bool CSSValueIsUndefined(float value);
#define CSS_NODE_PROPERTY(type, name, paramName) \
void CSSNodeSet##name(CSSNodeRef node, type paramName); \
#define CSS_NODE_PROPERTY(type, name, paramName) \
void CSSNodeSet##name(CSSNodeRef node, type paramName); \
type CSSNodeGet##name(CSSNodeRef node);
#define CSS_NODE_STYLE_PROPERTY(type, name, paramName) \
void CSSNodeStyleSet##name(CSSNodeRef node, type paramName); \
#define CSS_NODE_STYLE_PROPERTY(type, name, paramName) \
void CSSNodeStyleSet##name(CSSNodeRef node, type paramName); \
type CSSNodeStyleGet##name(CSSNodeRef node);
#define CSS_NODE_LAYOUT_PROPERTY(type, name) type CSSNodeLayoutGet##name(CSSNodeRef node);