Apply clang-format

Reviewed By: igorsugak

Differential Revision: D28477074

fbshipit-source-id: f15dfc45b9fb30c661ebe2899cd882676d0fdf2a
This commit is contained in:
Andres Suarez authored and Facebook GitHub Bot committed 2021-05-20 21:24:25 -07:00
1 parent a657c2655f
commit ffab8e3f46
4 files changed
+26 -28

No files matched your search

+11 -11
View File
@@ -20,17 +20,17 @@ RCT_EXTERN BOOL RCTIsMainQueue(void);
* assert handler through `RCTSetAssertFunction`.
*/
#ifndef NS_BLOCK_ASSERTIONS
#define RCTAssert(condition, ...) \
do { \
if ((condition) == 0) { \
_RCTAssertFormat(#condition, __FILE__, __LINE__, __func__, __VA_ARGS__); \
if (RCT_NSASSERT) { \
[[NSAssertionHandler currentHandler] handleFailureInFunction:(NSString * _Nonnull) @(__func__) \
file:(NSString * _Nonnull) @(__FILE__) \
lineNumber:__LINE__ \
description:__VA_ARGS__]; \
} \
} \
#define RCTAssert(condition, ...) \
do { \
if ((condition) == 0) { \
_RCTAssertFormat(#condition, __FILE__, __LINE__, __func__, __VA_ARGS__); \
if (RCT_NSASSERT) { \
[[NSAssertionHandler currentHandler] handleFailureInFunction:(NSString *_Nonnull)@(__func__) \
file:(NSString *_Nonnull)@(__FILE__) \
lineNumber:__LINE__ \
description:__VA_ARGS__]; \
} \
} \
} while (false)
#else
#define RCTAssert(condition, ...) \
@@ -726,8 +726,7 @@ static void jni_YGNodePrintJNI(JNIEnv* env, jobject obj, jlong nativePointer) {
const YGNodeRef node = _jlong2YGNodeRef(nativePointer);
YGNodePrint(
node,
(YGPrintOptions)(
YGPrintOptionsStyle | YGPrintOptionsLayout | YGPrintOptionsChildren));
(YGPrintOptions) (YGPrintOptionsStyle | YGPrintOptionsLayout | YGPrintOptionsChildren));
#endif
}
@@ -191,9 +191,10 @@ TEST(RawPropsTest, handleRawPropsSingleIntGetManyTimes) {
}
TEST(RawPropsTest, handleRawPropsPrimitiveTypes) {
const auto &raw = RawProps(folly::dynamic::object("intValue", (int)42)(
"doubleValue", (double)17.42)("floatValue", (float)66.67)(
"stringValue", "helloworld")("boolValue", true));
const auto &raw = RawProps(
folly::dynamic::object("intValue", (int)42)("doubleValue", (double)17.42)(
"floatValue",
(float)66.67)("stringValue", "helloworld")("boolValue", true));
auto parser = RawPropsParser();
parser.prepare<PropsPrimitiveTypes>();
@@ -209,9 +210,10 @@ TEST(RawPropsTest, handleRawPropsPrimitiveTypes) {
}
TEST(RawPropsTest, handleRawPropsPrimitiveTypesGetTwice) {
const auto &raw = RawProps(folly::dynamic::object("intValue", (int)42)(
"doubleValue", (double)17.42)("floatValue", (float)66.67)(
"stringValue", "helloworld")("boolValue", true));
const auto &raw = RawProps(
folly::dynamic::object("intValue", (int)42)("doubleValue", (double)17.42)(
"floatValue",
(float)66.67)("stringValue", "helloworld")("boolValue", true));
auto parser = RawPropsParser();
parser.prepare<PropsPrimitiveTypes>();
@@ -235,9 +237,10 @@ TEST(RawPropsTest, handleRawPropsPrimitiveTypesGetTwice) {
}
TEST(RawPropsTest, handleRawPropsPrimitiveTypesGetOutOfOrder) {
const auto &raw = RawProps(folly::dynamic::object("intValue", (int)42)(
"doubleValue", (double)17.42)("floatValue", (float)66.67)(
"stringValue", "helloworld")("boolValue", true));
const auto &raw = RawProps(
folly::dynamic::object("intValue", (int)42)("doubleValue", (double)17.42)(
"floatValue",
(float)66.67)("stringValue", "helloworld")("boolValue", true));
auto parser = RawPropsParser();
parser.prepare<PropsPrimitiveTypes>();
+2 -6
View File
@@ -4194,9 +4194,7 @@ YOGA_EXPORT void YGNodeCalculateLayoutWithContext(
if (node->getConfig()->printTree) {
YGNodePrint(
node,
(YGPrintOptions)(
YGPrintOptionsLayout | YGPrintOptionsChildren |
YGPrintOptionsStyle));
(YGPrintOptions) (YGPrintOptionsLayout | YGPrintOptionsChildren | YGPrintOptionsStyle));
}
#endif
}
@@ -4256,9 +4254,7 @@ YOGA_EXPORT void YGNodeCalculateLayoutWithContext(
if (nodeWithoutLegacyFlag->getConfig()->printTree) {
YGNodePrint(
nodeWithoutLegacyFlag,
(YGPrintOptions)(
YGPrintOptionsLayout | YGPrintOptionsChildren |
YGPrintOptionsStyle));
(YGPrintOptions) (YGPrintOptionsLayout | YGPrintOptionsChildren | YGPrintOptionsStyle));
}
#endif
}