Apply clang-format rules

Summary:
@public

Formats Yoga's source according to our clang-format configuration

Reviewed By: SidharthGuglani

Differential Revision: D13596650

fbshipit-source-id: c3722d4eafd63b7596a8b1e85c0197e9d2d6cb7d
This commit is contained in:
David Aurelio
2019-01-08 12:47:53 -08:00
committed by Facebook Github Bot
parent 5ee32fbefc
commit ab9d06abf5
16 changed files with 188 additions and 176 deletions

View File

@@ -100,7 +100,7 @@ static void YGTransferLayoutOutputsRecursive(YGNodeRef root) {
const int PADDING = 2;
const int BORDER = 4;
int hasEdgeSetFlag = (int)obj->getFieldValue(edgeSetFlagField);
int hasEdgeSetFlag = (int) obj->getFieldValue(edgeSetFlagField);
obj->setFieldValue(widthField, YGNodeLayoutGetWidth(root));
obj->setFieldValue(heightField, YGNodeLayoutGetHeight(root));
@@ -180,8 +180,10 @@ static inline YGConfigRef _jlong2YGConfigRef(jlong addr) {
return reinterpret_cast<YGConfigRef>(static_cast<intptr_t>(addr));
}
static YGNodeRef
YGJNIOnNodeClonedFunc(YGNodeRef oldNode, YGNodeRef owner, int childIndex) {
static YGNodeRef YGJNIOnNodeClonedFunc(
YGNodeRef oldNode,
YGNodeRef owner,
int childIndex) {
auto config = oldNode->getConfig();
if (!config) {
return nullptr;
@@ -404,7 +406,7 @@ void jni_YGNodeMarkDirtyAndPropogateToDescendants(jlong nativePointer) {
}
jboolean jni_YGNodeIsDirty(jlong nativePointer) {
return (jboolean)_jlong2YGNodeRef(nativePointer)->isDirty();
return (jboolean) _jlong2YGNodeRef(nativePointer)->isDirty();
}
void jni_YGNodeSetHasMeasureFunc(jlong nativePointer, jboolean hasMeasureFunc) {
@@ -432,14 +434,14 @@ struct JYogaValue : public JavaClass<JYogaValue> {
}
};
#define YG_NODE_JNI_STYLE_PROP(javatype, type, name) \
javatype jni_YGNodeStyleGet##name(jlong nativePointer) { \
return (javatype)YGNodeStyleGet##name(_jlong2YGNodeRef(nativePointer)); \
} \
\
void jni_YGNodeStyleSet##name(jlong nativePointer, javatype value) { \
YGNodeStyleSet##name( \
_jlong2YGNodeRef(nativePointer), static_cast<type>(value)); \
#define YG_NODE_JNI_STYLE_PROP(javatype, type, name) \
javatype jni_YGNodeStyleGet##name(jlong nativePointer) { \
return (javatype) YGNodeStyleGet##name(_jlong2YGNodeRef(nativePointer)); \
} \
\
void jni_YGNodeStyleSet##name(jlong nativePointer, javatype value) { \
YGNodeStyleSet##name( \
_jlong2YGNodeRef(nativePointer), static_cast<type>(value)); \
}
#define YG_NODE_JNI_STYLE_UNIT_PROP(name) \
@@ -467,7 +469,7 @@ struct JYogaValue : public JavaClass<JYogaValue> {
#define YG_NODE_JNI_STYLE_EDGE_PROP(javatype, type, name) \
javatype jni_YGNodeStyleGet##name(jlong nativePointer, jint edge) { \
return (javatype)YGNodeStyleGet##name( \
return (javatype) YGNodeStyleGet##name( \
_jlong2YGNodeRef(nativePointer), static_cast<YGEdge>(edge)); \
} \
\