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:
committed by
Facebook Github Bot 6
parent
6a44dbc43b
commit
7a1e353404
@@ -9,17 +9,21 @@
|
||||
|
||||
#include "CSSBenchmark.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <CSSLayout/CSSLayout.h>
|
||||
#include <time.h>
|
||||
|
||||
// Measure functions can be quite slow, for example when measuring text.
|
||||
// Simulate this by sleeping for 1 millisecond.
|
||||
static CSSSize _measure(void *context, float width, CSSMeasureMode widthMode, float height, CSSMeasureMode heightMode) {
|
||||
static CSSSize _measure(void *context,
|
||||
float width,
|
||||
CSSMeasureMode widthMode,
|
||||
float height,
|
||||
CSSMeasureMode heightMode) {
|
||||
struct timespec sleeptime = {0, 1000000};
|
||||
nanosleep(&sleeptime, NULL);
|
||||
return (CSSSize) {
|
||||
.width = widthMode == CSSMeasureModeUndefined ? 10 : width,
|
||||
.height = heightMode == CSSMeasureModeUndefined ? 10 : width,
|
||||
return (CSSSize){
|
||||
.width = widthMode == CSSMeasureModeUndefined ? 10 : width,
|
||||
.height = heightMode == CSSMeasureModeUndefined ? 10 : width,
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user