From 1dc82a89d7fedb4dc8d0a5a6854c0ac1c3acea68 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Wed, 11 Mar 2020 21:39:25 -0700 Subject: [PATCH] Daily `arc lint --take CLANGFORMAT` Reviewed By: zertosh Differential Revision: D20383094 fbshipit-source-id: 1dc497a98fd3b5962542735c5243d7ac9cd40da3 --- React/CxxBridge/RCTCxxBridge.mm | 5 ++--- ReactCommon/fabric/core/layout/LayoutMetrics.h | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/React/CxxBridge/RCTCxxBridge.mm b/React/CxxBridge/RCTCxxBridge.mm index b4c97ed4667..07b362a1ac2 100644 --- a/React/CxxBridge/RCTCxxBridge.mm +++ b/React/CxxBridge/RCTCxxBridge.mm @@ -1334,7 +1334,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithBundleURL [[NSNotificationCenter defaultCenter] postNotificationName:RCTJavaScriptWillStartExecutingNotification object:self->_parentBridge userInfo:@{@"bridge" : self}]; - + // hold a local reference to reactInstance in case a parallel thread // resets it between null check and usage auto reactInstance = self->_reactInstance; @@ -1350,8 +1350,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithBundleURL reactInstance->loadRAMBundle(std::move(registry), std::move(scriptStr), sourceUrlStr.UTF8String, !async); } } else if (reactInstance) { - reactInstance->loadScriptFromString( - std::make_unique(script), sourceUrlStr.UTF8String, !async); + reactInstance->loadScriptFromString(std::make_unique(script), sourceUrlStr.UTF8String, !async); } else { std::string methodName = async ? "loadApplicationScript" : "loadApplicationScriptSync"; throw std::logic_error("Attempt to call " + methodName + ": on uninitialized bridge"); diff --git a/ReactCommon/fabric/core/layout/LayoutMetrics.h b/ReactCommon/fabric/core/layout/LayoutMetrics.h index 12980f65f25..014ce93c6c1 100644 --- a/ReactCommon/fabric/core/layout/LayoutMetrics.h +++ b/ReactCommon/fabric/core/layout/LayoutMetrics.h @@ -59,8 +59,7 @@ struct LayoutMetrics { * The value is comparable by equality with any other `LayoutMetrics` value. */ static LayoutMetrics const EmptyLayoutMetrics = { - /* .frame = */ {{0, 0}, {-1.0, -1.0}} -}; + /* .frame = */ {{0, 0}, {-1.0, -1.0}}}; } // namespace react } // namespace facebook