diff --git a/packages/react-native/Libraries/Blob/RCTBlobCollector.h b/packages/react-native/Libraries/Blob/RCTBlobCollector.h index 4d0166aab7db94..6fbf41c33ffc04 100644 --- a/packages/react-native/Libraries/Blob/RCTBlobCollector.h +++ b/packages/react-native/Libraries/Blob/RCTBlobCollector.h @@ -9,8 +9,7 @@ @class RCTBlobManager; -namespace facebook { -namespace react { +namespace facebook::react { class JSI_EXPORT RCTBlobCollector : public jsi::HostObject { public: @@ -24,5 +23,4 @@ class JSI_EXPORT RCTBlobCollector : public jsi::HostObject { RCTBlobManager *blobManager_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/Libraries/Blob/RCTBlobCollector.mm b/packages/react-native/Libraries/Blob/RCTBlobCollector.mm index 60053c3a140351..c9afc78057c955 100644 --- a/packages/react-native/Libraries/Blob/RCTBlobCollector.mm +++ b/packages/react-native/Libraries/Blob/RCTBlobCollector.mm @@ -10,8 +10,7 @@ #import #import -namespace facebook { -namespace react { +namespace facebook::react { RCTBlobCollector::RCTBlobCollector(RCTBlobManager *blobManager, const std::string &blobId) : blobId_(blobId), blobManager_(blobManager) @@ -52,5 +51,4 @@ queue:RCTJSThread]; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/Libraries/Image/RCTImageURLLoaderWithAttribution.h b/packages/react-native/Libraries/Image/RCTImageURLLoaderWithAttribution.h index c512736e106501..87b59f0843c6cf 100644 --- a/packages/react-native/Libraries/Image/RCTImageURLLoaderWithAttribution.h +++ b/packages/react-native/Libraries/Image/RCTImageURLLoaderWithAttribution.h @@ -11,8 +11,7 @@ // TODO (T61325135): Remove C++ checks #ifdef __cplusplus -namespace facebook { -namespace react { +namespace facebook::react { struct ImageURLLoaderAttribution { int32_t nativeViewTag = 0; @@ -21,8 +20,7 @@ struct ImageURLLoaderAttribution { NSString *analyticTag; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react #endif @interface RCTImageURLLoaderRequest : NSObject diff --git a/packages/react-native/Libraries/TypeSafety/RCTConvertHelpers.h b/packages/react-native/Libraries/TypeSafety/RCTConvertHelpers.h index d33f42c8ff18d8..f47ddeae42994c 100644 --- a/packages/react-native/Libraries/TypeSafety/RCTConvertHelpers.h +++ b/packages/react-native/Libraries/TypeSafety/RCTConvertHelpers.h @@ -13,12 +13,10 @@ #import -namespace facebook { -namespace react { +namespace facebook::react { template using LazyVector = FB::LazyVector; -} -} +} // namespace facebook::react template NSArray *RCTConvertVecToArray(const ContainerT &vec, id (^convertor)(typename ContainerT::value_type element)) diff --git a/packages/react-native/Libraries/TypeSafety/RCTTypedModuleConstants.h b/packages/react-native/Libraries/TypeSafety/RCTTypedModuleConstants.h index a787b6788ebc5d..d6a71e57ac9510 100644 --- a/packages/react-native/Libraries/TypeSafety/RCTTypedModuleConstants.h +++ b/packages/react-native/Libraries/TypeSafety/RCTTypedModuleConstants.h @@ -30,8 +30,7 @@ @end -namespace facebook { -namespace react { +namespace facebook::react { // Objective-C doesn't allow arbitrary types in its lightweight generics, only object and block types. We can work // around that by having the struct type we care about be a block-argument. The block never exists at runtime. @@ -45,5 +44,4 @@ ModuleConstants typedConstants(typename T::Builder::Input &&value) return [_RCTTypedModuleConstants newWithUnsafeDictionary:builder.buildUnsafeRawValue()]; } -} -} +} // namespace facebook::react diff --git a/packages/react-native/React/Base/RCTManagedPointer.h b/packages/react-native/React/Base/RCTManagedPointer.h index ff444d27e711ee..0579ae578801e3 100644 --- a/packages/react-native/React/Base/RCTManagedPointer.h +++ b/packages/react-native/React/Base/RCTManagedPointer.h @@ -24,8 +24,7 @@ @end -namespace facebook { -namespace react { +namespace facebook::react { template RCTManagedPointer *managedPointer(P initializer) @@ -34,7 +33,6 @@ RCTManagedPointer *managedPointer(P initializer) return [[RCTManagedPointer alloc] initWithPointer:std::move(ptr)]; } -} -} +} // namespace facebook::react #endif diff --git a/packages/react-native/React/CxxBridge/JSCExecutorFactory.h b/packages/react-native/React/CxxBridge/JSCExecutorFactory.h index 17b64037c72ef5..902b44e7049645 100644 --- a/packages/react-native/React/CxxBridge/JSCExecutorFactory.h +++ b/packages/react-native/React/CxxBridge/JSCExecutorFactory.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { class JSCExecutorFactory : public JSExecutorFactory { public: @@ -25,5 +24,4 @@ class JSCExecutorFactory : public JSExecutorFactory { JSIExecutor::RuntimeInstaller runtimeInstaller_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/React/CxxBridge/JSCExecutorFactory.mm b/packages/react-native/React/CxxBridge/JSCExecutorFactory.mm index 78584cd4e6c121..6173ae5ccffac4 100644 --- a/packages/react-native/React/CxxBridge/JSCExecutorFactory.mm +++ b/packages/react-native/React/CxxBridge/JSCExecutorFactory.mm @@ -11,8 +11,7 @@ #import -namespace facebook { -namespace react { +namespace facebook::react { std::unique_ptr JSCExecutorFactory::createJSExecutor( std::shared_ptr delegate, @@ -22,5 +21,4 @@ facebook::jsc::makeJSCRuntime(), delegate, JSIExecutor::defaultTimeoutInvoker, runtimeInstaller_); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/React/CxxBridge/NSDataBigString.h b/packages/react-native/React/CxxBridge/NSDataBigString.h index c7f5ae7f61eac4..b8c571f8182607 100644 --- a/packages/react-native/React/CxxBridge/NSDataBigString.h +++ b/packages/react-native/React/CxxBridge/NSDataBigString.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { class NSDataBigString : public JSBigString { public: @@ -38,5 +37,4 @@ class NSDataBigString : public JSBigString { size_t m_length; }; -} -} +} // namespace facebook::react diff --git a/packages/react-native/React/CxxBridge/NSDataBigString.mm b/packages/react-native/React/CxxBridge/NSDataBigString.mm index 5708fa78a24306..620d97ecf3b0a8 100644 --- a/packages/react-native/React/CxxBridge/NSDataBigString.mm +++ b/packages/react-native/React/CxxBridge/NSDataBigString.mm @@ -7,8 +7,7 @@ #import "NSDataBigString.h" -namespace facebook { -namespace react { +namespace facebook::react { static NSData *ensureNullTerminated(NSData *source) { @@ -39,5 +38,4 @@ m_data = ensureNullTerminated(data); } -} -} +} // namespace facebook::react diff --git a/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h b/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h index 0285b70f217ee8..e2d48db4548d57 100644 --- a/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h +++ b/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h @@ -9,13 +9,11 @@ #import -namespace facebook { -namespace react { +namespace facebook::react { class JSExecutorFactory; -} -} +} // namespace facebook::react // This is a separate class so non-C++ implementations don't need to // take a C++ dependency. diff --git a/packages/react-native/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.h b/packages/react-native/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.h index 2a40f8316ba2d4..a258102a21fff0 100644 --- a/packages/react-native/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.h +++ b/packages/react-native/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /** * Creates a lambda used to bind a JSIRuntime in the context of @@ -19,5 +18,4 @@ namespace react { JSIExecutor::RuntimeInstaller RCTJSIExecutorRuntimeInstaller( JSIExecutor::RuntimeInstaller runtimeInstallerToWrap); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.mm b/packages/react-native/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.mm index 0372d4190167d8..5212cdd47af90c 100644 --- a/packages/react-native/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.mm +++ b/packages/react-native/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.mm @@ -10,8 +10,7 @@ #import #include -namespace facebook { -namespace react { +namespace facebook::react { JSIExecutor::RuntimeInstaller RCTJSIExecutorRuntimeInstaller(JSIExecutor::RuntimeInstaller runtimeInstallerToWrap) { @@ -29,5 +28,4 @@ }; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/React/CxxBridge/RCTMessageThread.h b/packages/react-native/React/CxxBridge/RCTMessageThread.h index c68fc281a405ce..cbd85025c9f8e4 100644 --- a/packages/react-native/React/CxxBridge/RCTMessageThread.h +++ b/packages/react-native/React/CxxBridge/RCTMessageThread.h @@ -13,8 +13,7 @@ #import #import -namespace facebook { -namespace react { +namespace facebook::react { class RCTMessageThread : public MessageQueueThread, public std::enable_shared_from_this { @@ -36,5 +35,4 @@ class RCTMessageThread : public MessageQueueThread, std::atomic_bool m_shutdown; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/React/CxxBridge/RCTMessageThread.mm b/packages/react-native/React/CxxBridge/RCTMessageThread.mm index 48b2a604e7ea00..d234aaaa8cfd43 100644 --- a/packages/react-native/React/CxxBridge/RCTMessageThread.mm +++ b/packages/react-native/React/CxxBridge/RCTMessageThread.mm @@ -20,8 +20,7 @@ // particular, the sync functions are only used for bridge setup and // teardown, and quitSynchronous is guaranteed to be called. -namespace facebook { -namespace react { +namespace facebook::react { RCTMessageThread::RCTMessageThread(NSRunLoop *runLoop, RCTJavaScriptCompleteBlock errorBlock) : m_cfRunLoop([runLoop getCFRunLoop]), m_errorBlock(errorBlock), m_shutdown(false) @@ -110,5 +109,4 @@ CFRetain(m_cfRunLoop); } -} -} +} // namespace facebook::react diff --git a/packages/react-native/React/CxxBridge/RCTObjcExecutor.h b/packages/react-native/React/CxxBridge/RCTObjcExecutor.h index 9cba372d4b0fae..87ad0858f505d0 100644 --- a/packages/react-native/React/CxxBridge/RCTObjcExecutor.h +++ b/packages/react-native/React/CxxBridge/RCTObjcExecutor.h @@ -12,8 +12,7 @@ #import #import -namespace facebook { -namespace react { +namespace facebook::react { class RCTObjcExecutorFactory : public JSExecutorFactory { public: @@ -29,5 +28,4 @@ class RCTObjcExecutorFactory : public JSExecutorFactory { RCTJavaScriptCompleteBlock m_errorBlock; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/React/CxxBridge/RCTObjcExecutor.mm b/packages/react-native/React/CxxBridge/RCTObjcExecutor.mm index df22d637bde3e6..0aa453803cf79b 100644 --- a/packages/react-native/React/CxxBridge/RCTObjcExecutor.mm +++ b/packages/react-native/React/CxxBridge/RCTObjcExecutor.mm @@ -20,8 +20,7 @@ #import #import -namespace facebook { -namespace react { +namespace facebook::react { namespace { @@ -144,5 +143,4 @@ virtual void setGlobalVariable(std::string propName, std::unique_ptr(new RCTObjcExecutor(m_jse, m_errorBlock, jsQueue, delegate)); } -} -} +} // namespace facebook::react diff --git a/packages/react-native/React/CxxLogUtils/RCTDefaultCxxLogFunction.h b/packages/react-native/React/CxxLogUtils/RCTDefaultCxxLogFunction.h index 2c745d5e7eded2..36a2abad2429f9 100644 --- a/packages/react-native/React/CxxLogUtils/RCTDefaultCxxLogFunction.h +++ b/packages/react-native/React/CxxLogUtils/RCTDefaultCxxLogFunction.h @@ -9,10 +9,8 @@ #import -namespace facebook { -namespace react { +namespace facebook::react { void RCTDefaultCxxLogFunction(ReactNativeLogLevel level, const char *message); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/React/CxxLogUtils/RCTDefaultCxxLogFunction.mm b/packages/react-native/React/CxxLogUtils/RCTDefaultCxxLogFunction.mm index 449c7b3b3a37fb..a9f172cb344c2d 100644 --- a/packages/react-native/React/CxxLogUtils/RCTDefaultCxxLogFunction.mm +++ b/packages/react-native/React/CxxLogUtils/RCTDefaultCxxLogFunction.mm @@ -9,8 +9,7 @@ #import #import -namespace facebook { -namespace react { +namespace facebook::react { void RCTDefaultCxxLogFunction(ReactNativeLogLevel level, const char *message) { @@ -35,5 +34,4 @@ void RCTDefaultCxxLogFunction(ReactNativeLogLevel level, const char *message) } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/React/CxxModule/DispatchMessageQueueThread.h b/packages/react-native/React/CxxModule/DispatchMessageQueueThread.h index 76eaa15fd975b9..a8b755bd52c54e 100644 --- a/packages/react-native/React/CxxModule/DispatchMessageQueueThread.h +++ b/packages/react-native/React/CxxModule/DispatchMessageQueueThread.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { // RCTNativeModule arranges for native methods to be invoked on a queue which // is not the JS thread. C++ modules don't use RCTNativeModule, so this little @@ -43,5 +42,4 @@ class DispatchMessageQueueThread : public MessageQueueThread { RCTModuleData *moduleData_; }; -} -} +} // namespace facebook::react diff --git a/packages/react-native/React/CxxModule/RCTCxxModule.h b/packages/react-native/React/CxxModule/RCTCxxModule.h index 75d95a30901d97..093aafee890bfe 100644 --- a/packages/react-native/React/CxxModule/RCTCxxModule.h +++ b/packages/react-native/React/CxxModule/RCTCxxModule.h @@ -11,13 +11,9 @@ #import -namespace facebook { -namespace xplat { -namespace module { +namespace facebook::xplat::module { class CxxModule; -} -} -} +} // namespace facebook::react::module /** * Subclass RCTCxxModule to use cross-platform CxxModule on iOS. diff --git a/packages/react-native/React/CxxModule/RCTCxxUtils.h b/packages/react-native/React/CxxModule/RCTCxxUtils.h index cc1454f07601ff..b4411088e19f5c 100644 --- a/packages/react-native/React/CxxModule/RCTCxxUtils.h +++ b/packages/react-native/React/CxxModule/RCTCxxUtils.h @@ -13,8 +13,7 @@ @class RCTBridge; @class RCTModuleData; -namespace facebook { -namespace react { +namespace facebook::react { class Instance; class NativeModule; @@ -25,5 +24,4 @@ createNativeModules(NSArray *modules, RCTBridge *bridge, const NSError *tryAndReturnError(const std::function &func); NSString *deriveSourceURL(NSURL *url); -} -} +} // namespace facebook::react diff --git a/packages/react-native/React/CxxModule/RCTCxxUtils.mm b/packages/react-native/React/CxxModule/RCTCxxUtils.mm index 03f0ad0c83d8df..efb1f1a105c53b 100644 --- a/packages/react-native/React/CxxModule/RCTCxxUtils.mm +++ b/packages/react-native/React/CxxModule/RCTCxxUtils.mm @@ -17,8 +17,7 @@ #import "RCTCxxModule.h" #import "RCTNativeModule.h" -namespace facebook { -namespace react { +namespace facebook::react { using facebook::jsi::JSError; @@ -101,5 +100,4 @@ return sourceUrl ?: @""; } -} -} +} // namespace facebook::react diff --git a/packages/react-native/React/CxxModule/RCTNativeModule.h b/packages/react-native/React/CxxModule/RCTNativeModule.h index a83b16dd7b79c0..730839a9b52e08 100644 --- a/packages/react-native/React/CxxModule/RCTNativeModule.h +++ b/packages/react-native/React/CxxModule/RCTNativeModule.h @@ -8,8 +8,7 @@ #import #import -namespace facebook { -namespace react { +namespace facebook::react { class RCTNativeModule : public NativeModule { public: @@ -30,5 +29,4 @@ class RCTNativeModule : public NativeModule { RCTModuleData *m_moduleData; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/React/CxxModule/RCTNativeModule.mm b/packages/react-native/React/CxxModule/RCTNativeModule.mm index f400d6968d69ec..3f86bc87cb1c6a 100644 --- a/packages/react-native/React/CxxModule/RCTNativeModule.mm +++ b/packages/react-native/React/CxxModule/RCTNativeModule.mm @@ -26,8 +26,7 @@ enum SchedulingContext { Sync, Async }; } -namespace facebook { -namespace react { +namespace facebook::react { static MethodCallResult invokeInner( RCTBridge *bridge, @@ -235,5 +234,4 @@ static MethodCallResult invokeInner( return std::nullopt; } -} -} +} // namespace facebook::react diff --git a/packages/react-native/React/CxxUtils/RCTFollyConvert.h b/packages/react-native/React/CxxUtils/RCTFollyConvert.h index 7a0c239539769d..7da61aa9bd55a6 100644 --- a/packages/react-native/React/CxxUtils/RCTFollyConvert.h +++ b/packages/react-native/React/CxxUtils/RCTFollyConvert.h @@ -9,11 +9,9 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { folly::dynamic convertIdToFollyDynamic(id json); id convertFollyDynamicToId(const folly::dynamic &dyn); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/React/CxxUtils/RCTFollyConvert.mm b/packages/react-native/React/CxxUtils/RCTFollyConvert.mm index 4e881970903207..255c16422603ab 100644 --- a/packages/react-native/React/CxxUtils/RCTFollyConvert.mm +++ b/packages/react-native/React/CxxUtils/RCTFollyConvert.mm @@ -10,8 +10,7 @@ #import #import -namespace facebook { -namespace react { +namespace facebook::react { id convertFollyDynamicToId(const folly::dynamic &dyn) { @@ -114,5 +113,4 @@ id convertFollyDynamicToId(const folly::dynamic &dyn) return nil; } -} -} +} // namespace facebook::react diff --git a/packages/react-native/React/Fabric/RCTImageResponseObserverProxy.h b/packages/react-native/React/Fabric/RCTImageResponseObserverProxy.h index b12b3485ceb4d5..523396478ee186 100644 --- a/packages/react-native/React/Fabric/RCTImageResponseObserverProxy.h +++ b/packages/react-native/React/Fabric/RCTImageResponseObserverProxy.h @@ -13,8 +13,7 @@ NS_ASSUME_NONNULL_BEGIN -namespace facebook { -namespace react { +namespace facebook::react { class RCTImageResponseObserverProxy final : public ImageResponseObserver { public: @@ -28,7 +27,6 @@ class RCTImageResponseObserverProxy final : public ImageResponseObserver { __weak id delegate_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react NS_ASSUME_NONNULL_END diff --git a/packages/react-native/React/Fabric/RCTImageResponseObserverProxy.mm b/packages/react-native/React/Fabric/RCTImageResponseObserverProxy.mm index 609dbba9085328..d195d4fd81c8d9 100644 --- a/packages/react-native/React/Fabric/RCTImageResponseObserverProxy.mm +++ b/packages/react-native/React/Fabric/RCTImageResponseObserverProxy.mm @@ -12,8 +12,7 @@ #import #import -namespace facebook { -namespace react { +namespace facebook::react { RCTImageResponseObserverProxy::RCTImageResponseObserverProxy(id delegate) : delegate_(delegate) @@ -49,5 +48,4 @@ }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/React/Fabric/Utils/PlatformRunLoopObserver.h b/packages/react-native/React/Fabric/Utils/PlatformRunLoopObserver.h index 98505f239aca71..2141d3943dd69a 100644 --- a/packages/react-native/React/Fabric/Utils/PlatformRunLoopObserver.h +++ b/packages/react-native/React/Fabric/Utils/PlatformRunLoopObserver.h @@ -12,8 +12,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Concrete iOS-specific implementation of `RunLoopObserver` using @@ -50,5 +49,4 @@ class MainRunLoopObserver final : public PlatformRunLoopObserver { : PlatformRunLoopObserver(activities, owner, CFRunLoopGetMain()) {} }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/React/Fabric/Utils/PlatformRunLoopObserver.mm b/packages/react-native/React/Fabric/Utils/PlatformRunLoopObserver.mm index 9f6268df447370..cf731e0b86aed9 100644 --- a/packages/react-native/React/Fabric/Utils/PlatformRunLoopObserver.mm +++ b/packages/react-native/React/Fabric/Utils/PlatformRunLoopObserver.mm @@ -9,8 +9,7 @@ #import -namespace facebook { -namespace react { +namespace facebook::react { static CFRunLoopActivity toCFRunLoopActivity(RunLoopObserver::Activity activity) { @@ -93,5 +92,4 @@ static CFRunLoopActivity toCFRunLoopActivity(RunLoopObserver::Activity activity) return CFRunLoopGetCurrent() == runLoop_; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/React/Fabric/Utils/RCTIdentifierPool.h b/packages/react-native/React/Fabric/Utils/RCTIdentifierPool.h index 92a35b79e22171..89c984e90d9dba 100644 --- a/packages/react-native/React/Fabric/Utils/RCTIdentifierPool.h +++ b/packages/react-native/React/Fabric/Utils/RCTIdentifierPool.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { template class RCTIdentifierPool { @@ -40,5 +39,4 @@ class RCTIdentifierPool { int lastIndex; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp b/packages/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp index 5e7df8b86bc062..db1206a855a825 100644 --- a/packages/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp +++ b/packages/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp @@ -33,8 +33,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { void registerComponents( std::shared_ptr registry) { @@ -72,8 +71,7 @@ std::shared_ptr javaModuleProvider( return rncli_ModuleProvider(name, params); } -} // namespace react -} // namespace facebook +} // namespace facebook::react JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) { return facebook::jni::initialize(vm, [] { diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/hermes/jni/JHermesInstance.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/hermes/jni/JHermesInstance.cpp index e60ef0f74c3fae..4c04821a75e5c6 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/hermes/jni/JHermesInstance.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/hermes/jni/JHermesInstance.cpp @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { jni::local_ref JHermesInstance::initHybrid( jni::alias_ref) { @@ -28,5 +27,4 @@ std::unique_ptr JHermesInstance::createJSRuntime() noexcept { return HermesInstance::createJSRuntime(); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/hermes/jni/JHermesInstance.h b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/hermes/jni/JHermesInstance.h index 13a427057bce82..117556998971d0 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/hermes/jni/JHermesInstance.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/hermes/jni/JHermesInstance.h @@ -17,8 +17,7 @@ #include #include "../../jni/JJSEngineInstance.h" -namespace facebook { -namespace react { +namespace facebook::react { class JHermesInstance : public jni::HybridClass { @@ -38,5 +37,4 @@ class JHermesInstance friend HybridBase; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJSEngineInstance.h b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJSEngineInstance.h index ee166fb6b17e35..ba4d66cfea0c99 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJSEngineInstance.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJSEngineInstance.h @@ -11,9 +11,7 @@ #include #include -namespace facebook { - -namespace react { +namespace facebook::react { class JJSEngineInstance : public jni::HybridClass, public JSEngineInstance { @@ -25,5 +23,4 @@ class JJSEngineInstance : public jni::HybridClass, friend HybridBase; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJSTimerExecutor.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJSTimerExecutor.cpp index 60a1ad64462ec9..ebd93d2d49b9fe 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJSTimerExecutor.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJSTimerExecutor.cpp @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { void JJSTimerExecutor::setTimerManager( std::weak_ptr timerManager) { @@ -33,5 +32,4 @@ void JJSTimerExecutor::registerNatives() { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJSTimerExecutor.h b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJSTimerExecutor.h index d5a9904c9fe1b8..3da6a77b1f8217 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJSTimerExecutor.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJSTimerExecutor.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class JJSTimerExecutor : public jni::HybridClass { public: @@ -35,5 +34,4 @@ class JJSTimerExecutor : public jni::HybridClass { std::weak_ptr timerManager_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJavaTimerManager.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJavaTimerManager.cpp index 36276e5d2a9380..638f664cc782ce 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJavaTimerManager.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJavaTimerManager.cpp @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { void JJavaTimerManager::createTimer( uint32_t timerID, @@ -28,5 +27,4 @@ void JJavaTimerManager::deleteTimer(uint32_t timerID) { method(self(), timerID); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJavaTimerManager.h b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJavaTimerManager.h index 3e39f04879a46a..d44cec367fc795 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJavaTimerManager.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JJavaTimerManager.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { struct JJavaTimerManager : jni::JavaClass { static auto constexpr kJavaDescriptor = @@ -24,5 +23,4 @@ struct JJavaTimerManager : jni::JavaClass { void deleteTimer(uint32_t timerID); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JReactExceptionManager.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JReactExceptionManager.cpp index 2a8cbde9d12141..a8968d77bcc1aa 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JReactExceptionManager.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JReactExceptionManager.cpp @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { void JReactExceptionManager::reportJsException( const JReadableMapBuffer::javaobject errorMapBuffer) { @@ -24,5 +23,4 @@ void JReactExceptionManager::reportJsException( } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JReactExceptionManager.h b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JReactExceptionManager.h index 7f16ec9ca7e30f..23b4ea46b900a4 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JReactExceptionManager.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JReactExceptionManager.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class JReactExceptionManager : public facebook::jni::JavaClass { @@ -23,5 +22,4 @@ class JReactExceptionManager void reportJsException(const JReadableMapBuffer::javaobject errorMapBuffer); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JReactInstance.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JReactInstance.cpp index 2d1837ac9df550..d5ce7517657ac5 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JReactInstance.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JReactInstance.cpp @@ -26,8 +26,7 @@ #include #include "JavaTimerRegistry.h" -namespace facebook { -namespace react { +namespace facebook::react { JReactInstance::JReactInstance( jni::alias_ref jsEngineInstance, @@ -232,5 +231,4 @@ void JReactInstance::registerNatives() { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JReactInstance.h b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JReactInstance.h index 6604af59955b3b..61dfa4debee201 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JReactInstance.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JReactInstance.h @@ -27,8 +27,7 @@ #include "JJavaTimerManager.h" #include "JReactExceptionManager.h" -namespace facebook { -namespace react { +namespace facebook::react { class JReactInstance : public jni::HybridClass { public: @@ -105,5 +104,4 @@ class JReactInstance : public jni::HybridClass { jni::global_ref jBindingsInstaller_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JavaTimerRegistry.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JavaTimerRegistry.cpp index 3cbff64a6e9a49..842cade5af292f 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JavaTimerRegistry.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JavaTimerRegistry.cpp @@ -7,8 +7,7 @@ #include "JavaTimerRegistry.h" -namespace facebook { -namespace react { +namespace facebook::react { JavaTimerRegistry::JavaTimerRegistry( jni::global_ref javaTimerManager) @@ -26,5 +25,4 @@ void JavaTimerRegistry::deleteTimer(uint32_t timerID) { javaTimerManager_->deleteTimer(timerID); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JavaTimerRegistry.h b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JavaTimerRegistry.h index dbfd43bde72372..ae89a5296f8b5f 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JavaTimerRegistry.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/bridgeless/jni/JavaTimerRegistry.h @@ -14,8 +14,7 @@ #include "JJavaTimerManager.h" -namespace facebook { -namespace react { +namespace facebook::react { /** * Call into JavaTimerManager.java to schedule and delete timers @@ -36,5 +35,4 @@ class JavaTimerRegistry : public PlatformTimerRegistry { jni::global_ref javaTimerManager_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.cpp index 1a9743187a31cd..a4bb58e0eb6cd3 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.cpp @@ -37,8 +37,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { jni::local_ref Binding::initHybrid( jni::alias_ref) { @@ -586,5 +585,4 @@ void Binding::registerNatives() { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.h b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.h index d3ba4dd4dd7f70..a1f443b1bcaa5b 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/Binding.h @@ -22,8 +22,7 @@ #include "EventEmitterWrapper.h" #include "JFabricUIManager.h" -namespace facebook { -namespace react { +namespace facebook::react { class ComponentFactory; class EventBeatManager; @@ -151,5 +150,4 @@ class Binding : public jni::HybridClass, bool enableFabricLogs_{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/ComponentFactory.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/ComponentFactory.cpp index 77425a03549f70..e7ecc79aba21a1 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/ComponentFactory.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/ComponentFactory.cpp @@ -13,8 +13,7 @@ using namespace facebook::jsi; -namespace facebook { -namespace react { +namespace facebook::react { jni::local_ref ComponentFactory::initHybrid( jni::alias_ref) { @@ -27,5 +26,4 @@ void ComponentFactory::registerNatives() { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/ComponentFactory.h b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/ComponentFactory.h index ffbb3f7ba3aac7..b7ae67dd0e1d2a 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/ComponentFactory.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/ComponentFactory.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class Instance; @@ -29,5 +28,4 @@ class ComponentFactory : public jni::HybridClass { static jni::local_ref initHybrid(jni::alias_ref); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.cpp index 933e9fed2a596e..b82a561a074c05 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.cpp @@ -24,8 +24,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { CoreComponentsRegistry::CoreComponentsRegistry(ComponentFactory *delegate) : delegate_(delegate) {} @@ -109,5 +108,4 @@ void CoreComponentsRegistry::registerNatives() { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.h b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.h index 4821ee29f7339b..a9f24c9c003b32 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.h @@ -12,8 +12,7 @@ #include #include "ComponentFactory.h" -namespace facebook { -namespace react { +namespace facebook::react { class CoreComponentsRegistry : public facebook::jni::HybridClass { @@ -38,5 +37,4 @@ class CoreComponentsRegistry ComponentFactory *delegate); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/EventBeatManager.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/EventBeatManager.cpp index 9e9e383792e809..eeafad82499da4 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/EventBeatManager.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/EventBeatManager.cpp @@ -9,8 +9,7 @@ #include using namespace facebook::jni; -namespace facebook { -namespace react { +namespace facebook::react { EventBeatManager::EventBeatManager( jni::alias_ref jhybridobject) @@ -48,5 +47,4 @@ void EventBeatManager::registerNatives() { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/EventBeatManager.h b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/EventBeatManager.h index 39b2607770886d..228e4e9bbba129 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/EventBeatManager.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/EventBeatManager.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class EventBeatManagerObserver { public: @@ -63,5 +62,4 @@ class EventBeatManager : public jni::HybridClass { jni::alias_ref jhybridobject); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/EventEmitterWrapper.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/EventEmitterWrapper.cpp index 638cf9e2d92832..88e9f66d4be178 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/EventEmitterWrapper.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/EventEmitterWrapper.cpp @@ -10,8 +10,7 @@ using namespace facebook::jni; -namespace facebook { -namespace react { +namespace facebook::react { void EventEmitterWrapper::dispatchEvent( std::string eventName, @@ -51,5 +50,4 @@ void EventEmitterWrapper::registerNatives() { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/EventEmitterWrapper.h b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/EventEmitterWrapper.h index a3834ad9357bc0..977fd13bca8439 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/EventEmitterWrapper.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/EventEmitterWrapper.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class Instance; @@ -35,5 +34,4 @@ class EventEmitterWrapper : public jni::HybridClass { int customCoalesceKey); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp index dcf8106c140839..8643140cc3b19d 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp @@ -26,8 +26,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { constexpr static auto kReactFeatureFlagsJavaDescriptor = "com/facebook/react/config/ReactFeatureFlags"; @@ -959,5 +958,4 @@ void FabricMountingManager::onAllAnimationsComplete() { allAnimationsCompleteJNI(javaUIManager_); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.h b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.h index 01248be957cbd1..ab9e159f6cf3e7 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.h @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ReactNativeConfig; struct ShadowView; @@ -68,5 +67,4 @@ class FabricMountingManager final { ShadowView const &newShadowView); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JBackgroundExecutor.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JBackgroundExecutor.cpp index e6d4f641f5e1c4..43bb9ce15882b8 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JBackgroundExecutor.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JBackgroundExecutor.cpp @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { using namespace facebook::jni; @@ -26,5 +25,4 @@ BackgroundExecutor JBackgroundExecutor::create(const std::string &name) { }; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JBackgroundExecutor.h b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JBackgroundExecutor.h index 50e37dacd18a85..337f9615c6e119 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JBackgroundExecutor.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/JBackgroundExecutor.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class JBackgroundExecutor : public jni::JavaClass { public: @@ -21,5 +20,4 @@ class JBackgroundExecutor : public jni::JavaClass { static BackgroundExecutor create(const std::string &name); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/MountItem.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/MountItem.cpp index 7e53343220f954..79046a0220a0b6 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/MountItem.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/MountItem.cpp @@ -7,8 +7,7 @@ #include "MountItem.h" -namespace facebook { -namespace react { +namespace facebook::react { CppMountItem CppMountItem::CreateMountItem(ShadowView const &shadowView) { return {CppMountItem::Type::Create, {}, {}, shadowView, -1}; @@ -62,5 +61,4 @@ CppMountItem CppMountItem::UpdateOverflowInsetMountItem( return {CppMountItem::Type::UpdateOverflowInset, {}, {}, shadowView, -1}; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/MountItem.h b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/MountItem.h index f2e82f7a23e892..893eefdf2966ef 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/MountItem.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/MountItem.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { struct JMountItem : public jni::JavaClass { static constexpr auto kJavaDescriptor = @@ -84,5 +83,4 @@ struct CppMountItem final { int index = {}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/ReactNativeConfigHolder.h b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/ReactNativeConfigHolder.h index faf602a2f00581..d6a7903cc0500e 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/ReactNativeConfigHolder.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/ReactNativeConfigHolder.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /** * Implementation of ReactNativeConfig that wraps a FabricMobileConfig Java @@ -33,5 +32,4 @@ class ReactNativeConfigHolder : public ReactNativeConfig { jni::global_ref reactNativeConfig_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/StateWrapperImpl.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/StateWrapperImpl.cpp index e79d25f55dfa17..f7301907b5b3d5 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/StateWrapperImpl.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/StateWrapperImpl.cpp @@ -13,8 +13,7 @@ using namespace facebook::jni; -namespace facebook { -namespace react { +namespace facebook::react { /** * Called from Java constructor through the JNI. @@ -64,5 +63,4 @@ void StateWrapperImpl::registerNatives() { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/StateWrapperImpl.h b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/StateWrapperImpl.h index 92ec87e9bb2493..691a80d0642792 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/StateWrapperImpl.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/StateWrapperImpl.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class Instance; @@ -38,5 +37,4 @@ class StateWrapperImpl : public jni::HybridClass { static jni::local_ref initHybrid(jni::alias_ref); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/SurfaceHandlerBinding.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/SurfaceHandlerBinding.cpp index 63559fe3bb929a..688db9052bf214 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/SurfaceHandlerBinding.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/SurfaceHandlerBinding.cpp @@ -8,8 +8,7 @@ #include "SurfaceHandlerBinding.h" #include -namespace facebook { -namespace react { +namespace facebook::react { SurfaceHandlerBinding::SurfaceHandlerBinding( SurfaceId surfaceId, @@ -113,5 +112,4 @@ void SurfaceHandlerBinding::registerNatives() { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/SurfaceHandlerBinding.h b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/SurfaceHandlerBinding.h index e067810a31a4c6..2fd2c812d9ef4d 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/SurfaceHandlerBinding.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/SurfaceHandlerBinding.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class SurfaceHandlerBinding : public jni::HybridClass { public: @@ -63,5 +62,4 @@ class SurfaceHandlerBinding : public jni::HybridClass { jni::alias_ref moduleName); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/viewPropConversions.h b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/viewPropConversions.h index 1c05d7973fb8ec..19381f8d585a79 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/fabric/viewPropConversions.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/fabric/viewPropConversions.h @@ -16,8 +16,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { namespace { static MapBuffer convertAccessibilityActions( @@ -219,5 +218,4 @@ MapBuffer convertTransform(Transform const &transform) { } } // namespace -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/hermes/reactexecutor/OnLoad.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/hermes/reactexecutor/OnLoad.cpp index d3182e95305f58..795a2ac7b9022e 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/hermes/reactexecutor/OnLoad.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/hermes/reactexecutor/OnLoad.cpp @@ -19,8 +19,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { static void hermesFatalHandler(const std::string &reason) { LOG(ERROR) << "Hermes Fatal: " << reason << "\n"; @@ -110,8 +109,7 @@ class HermesExecutorHolder using HybridBase::HybridBase; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { return facebook::jni::initialize( diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.cpp index e3345f038be28b..043d5afcfaeb84 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.cpp @@ -43,8 +43,7 @@ using namespace facebook::jni; -namespace facebook { -namespace react { +namespace facebook::react { namespace { @@ -418,5 +417,4 @@ CatalystInstanceImpl::getRuntimeScheduler() { return runtimeScheduler_; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.h index cd242903faba8d..bc07691e331a68 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.h @@ -20,8 +20,7 @@ #include "JavaModuleWrapper.h" #include "ModuleRegistryBuilder.h" -namespace facebook { -namespace react { +namespace facebook::react { class Instance; class JavaScriptExecutorHolder; @@ -117,5 +116,4 @@ class CatalystInstanceImpl : public jni::HybridClass { jni::global_ref runtimeScheduler_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapper.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapper.cpp index f712545de7d316..aab1371be692a9 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapper.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapper.cpp @@ -16,8 +16,7 @@ using namespace facebook::jni; using namespace facebook::xplat::module; -namespace facebook { -namespace react { +namespace facebook::react { jni::local_ref CxxModuleWrapper::makeDsoNative( jni::alias_ref, @@ -55,5 +54,4 @@ jni::local_ref CxxModuleWrapper::makeDsoNative( std::unique_ptr((*factory)())); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapper.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapper.h index 656fd8ef0a6e37..1534b51e29e19a 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapper.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapper.h @@ -9,8 +9,7 @@ #include "CxxModuleWrapperBase.h" -namespace facebook { -namespace react { +namespace facebook::react { class CxxModuleWrapper : public jni::HybridClass { @@ -46,5 +45,4 @@ class CxxModuleWrapper std::unique_ptr module_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapperBase.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapperBase.h index 3b561522409b45..edb353ac586dcd 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapperBase.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapperBase.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { struct JNativeModule : jni::JavaClass { constexpr static const char *const kJavaDescriptor = @@ -43,5 +42,4 @@ class CxxModuleWrapperBase virtual std::unique_ptr getModule() = 0; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/CxxSharedModuleWrapper.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/CxxSharedModuleWrapper.h index 1a06300c2e6dbb..8d6dd71f8c0928 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/CxxSharedModuleWrapper.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/CxxSharedModuleWrapper.h @@ -11,8 +11,7 @@ #include "CxxModuleWrapperBase.h" -namespace facebook { -namespace react { +namespace facebook::react { class CxxSharedModuleWrapper : public CxxModuleWrapperBase { public: @@ -35,5 +34,4 @@ class CxxSharedModuleWrapper : public CxxModuleWrapperBase { std::shared_ptr shared_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JCallback.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JCallback.h index da480384d9e897..56f0a4109a8ea3 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JCallback.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JCallback.h @@ -14,8 +14,7 @@ #include "NativeArray.h" -namespace facebook { -namespace react { +namespace facebook::react { class Instance; @@ -55,5 +54,4 @@ class JCxxCallbackImpl : public jni::HybridClass { Callback callback_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JInspector.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JInspector.cpp index 27eca48da219ed..a96bd26ab1bd8c 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JInspector.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JInspector.cpp @@ -11,8 +11,7 @@ #ifdef WITH_INSPECTOR -namespace facebook { -namespace react { +namespace facebook::react { namespace { @@ -108,7 +107,6 @@ void JInspector::registerNatives() { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react #endif diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JInspector.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JInspector.h index 4016365e589ade..b18d8ef58ee291 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JInspector.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JInspector.h @@ -15,8 +15,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { class JPage : public jni::JavaClass { public: @@ -75,7 +74,6 @@ class JInspector : public jni::HybridClass { IInspector *inspector_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react #endif diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JMessageQueueThread.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JMessageQueueThread.cpp index d95c28ea66b0b2..206844ec749050 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JMessageQueueThread.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JMessageQueueThread.cpp @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { using namespace jni; @@ -109,5 +108,4 @@ void JMessageQueueThread::quitSynchronous() { method(m_jobj); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JReactCxxErrorHandler.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JReactCxxErrorHandler.h index 45b2799f77fdf0..0bbf90351db629 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JReactCxxErrorHandler.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JReactCxxErrorHandler.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class JReactCxxErrorHandler : public jni::JavaClass { public: @@ -21,5 +20,4 @@ class JReactCxxErrorHandler : public jni::JavaClass { static void handleError(std::string message); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JReactMarker.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JReactMarker.cpp index 6708d0d1ba8770..c3be1ad2b55a3f 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JReactMarker.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JReactMarker.cpp @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { void JReactMarker::setLogPerfMarkerIfNeeded() { static std::once_flag flag{}; @@ -110,5 +109,4 @@ double JReactMarker::getAppStartTime() { return meth(cls); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JReactMarker.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JReactMarker.h index b945d5555a9631..a857ae4f3f72e1 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JReactMarker.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JReactMarker.h @@ -12,8 +12,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { class JReactMarker : public facebook::jni::JavaClass { public: @@ -41,5 +40,4 @@ class JReactMarker : public facebook::jni::JavaClass { static double getAppStartTime(); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JReactSoftExceptionLogger.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JReactSoftExceptionLogger.h index fda4b85e3ebd62..e412d668585d5d 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JReactSoftExceptionLogger.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JReactSoftExceptionLogger.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class JReactSoftExceptionLogger : public jni::JavaClass { @@ -24,5 +23,4 @@ class JReactSoftExceptionLogger std::string message); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JRuntimeExecutor.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JRuntimeExecutor.cpp index 70bda09416ccba..433e6ed143d127 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JRuntimeExecutor.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JRuntimeExecutor.cpp @@ -7,8 +7,7 @@ #include "JRuntimeExecutor.h" -namespace facebook { -namespace react { +namespace facebook::react { JRuntimeExecutor::JRuntimeExecutor(RuntimeExecutor runtimeExecutor) : runtimeExecutor_(runtimeExecutor) {} @@ -17,5 +16,4 @@ RuntimeExecutor JRuntimeExecutor::get() { return runtimeExecutor_; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JRuntimeExecutor.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JRuntimeExecutor.h index 03df73d1a446a5..b614ad1a1fecc3 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JRuntimeExecutor.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JRuntimeExecutor.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class JRuntimeExecutor : public jni::HybridClass { public: @@ -26,5 +25,4 @@ class JRuntimeExecutor : public jni::HybridClass { RuntimeExecutor runtimeExecutor_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JRuntimeScheduler.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JRuntimeScheduler.cpp index 7a9b3f8efaf9c2..587c32419752bc 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JRuntimeScheduler.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JRuntimeScheduler.cpp @@ -7,8 +7,7 @@ #include "JRuntimeScheduler.h" -namespace facebook { -namespace react { +namespace facebook::react { JRuntimeScheduler::JRuntimeScheduler( std::weak_ptr runtimeScheduler) @@ -18,5 +17,4 @@ std::weak_ptr JRuntimeScheduler::get() { return runtimeScheduler_; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JRuntimeScheduler.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JRuntimeScheduler.h index 8bc42bf9d024c3..6220ccedda3437 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JRuntimeScheduler.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JRuntimeScheduler.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class JRuntimeScheduler : public jni::HybridClass { public: @@ -26,5 +25,4 @@ class JRuntimeScheduler : public jni::HybridClass { std::weak_ptr runtimeScheduler_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JSLoader.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JSLoader.cpp index dc87d09bac8ff2..f37f1ce6ca02e2 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JSLoader.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JSLoader.cpp @@ -20,8 +20,7 @@ using fbsystrace::FbSystraceSection; using namespace facebook::jni; -namespace facebook { -namespace react { +namespace facebook::react { class AssetManagerString : public JSBigString { public: @@ -95,5 +94,4 @@ loadScriptFromAssets(AAssetManager *manager, const std::string &assetName) { "' is packaged correctly for release.")); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JSLoader.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JSLoader.h index d16f2990276c25..2c04656d85033f 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JSLoader.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JSLoader.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { struct JAssetManager : jni::JavaClass { static constexpr auto kJavaDescriptor = "Landroid/content/res/AssetManager;"; @@ -30,5 +29,4 @@ std::unique_ptr loadScriptFromAssets( AAssetManager *assetManager, const std::string &assetName); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JSLogging.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JSLogging.cpp index cf0a293688abc9..be29b28aa10867 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JSLogging.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JSLogging.cpp @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { void reactAndroidLoggingHook( const std::string &message, @@ -25,5 +24,4 @@ void reactAndroidLoggingHook( message, static_cast(logLevel + ANDROID_LOG_DEBUG)); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JSLogging.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JSLogging.h index 0fd115bafa3ca3..36a246782fe78b 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JSLogging.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JSLogging.h @@ -10,13 +10,11 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { void reactAndroidLoggingHook( const std::string &message, android_LogPriority logLevel); void reactAndroidLoggingHook(const std::string &message, unsigned int logLevel); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JavaModuleWrapper.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JavaModuleWrapper.cpp index 5cfdf7f5943c8c..c4e32b11cd67e2 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JavaModuleWrapper.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JavaModuleWrapper.cpp @@ -26,8 +26,7 @@ using facebook::xplat::module::CxxModule; -namespace facebook { -namespace react { +namespace facebook::react { std::string JMethodDescriptor::getSignature() const { static auto signature = javaClassStatic()->getField("signature"); @@ -159,5 +158,4 @@ jni::local_ref JMethodDescriptor::getMethod() return getFieldValue(method); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JavaModuleWrapper.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JavaModuleWrapper.h index f5bf7dcdf84590..40031cb0639f74 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JavaModuleWrapper.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JavaModuleWrapper.h @@ -13,8 +13,7 @@ #include "MethodInvoker.h" -namespace facebook { -namespace react { +namespace facebook::react { class Instance; class MessageQueueThread; @@ -85,5 +84,4 @@ class JavaNativeModule : public NativeModule { std::vector> syncMethods_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JavaScriptExecutorHolder.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JavaScriptExecutorHolder.h index 1a4fa1435c10a8..55cbc3eb545927 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JavaScriptExecutorHolder.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JavaScriptExecutorHolder.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class JavaScriptExecutorHolder : public jni::HybridClass { @@ -31,5 +30,4 @@ class JavaScriptExecutorHolder std::shared_ptr mExecutorFactory; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JniJSModulesUnbundle.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JniJSModulesUnbundle.cpp index 40aab053c681ba..b9bb2b56c020f0 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JniJSModulesUnbundle.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JniJSModulesUnbundle.cpp @@ -19,8 +19,7 @@ using magic_number_t = uint32_t; const magic_number_t MAGIC_FILE_HEADER = 0xFB0BD1E5; const char *MAGIC_FILE_NAME = "UNBUNDLE"; -namespace facebook { -namespace react { +namespace facebook::react { using asset_ptr = std::unique_ptr>; @@ -94,5 +93,4 @@ JSModulesUnbundle::Module JniJSModulesUnbundle::getModule( return {sourceUrl, std::string(buffer, AAsset_getLength(asset.get()))}; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JniJSModulesUnbundle.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JniJSModulesUnbundle.h index 71187fd99aec11..100cbe4b00f00e 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/JniJSModulesUnbundle.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/JniJSModulesUnbundle.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class JniJSModulesUnbundle : public JSModulesUnbundle { /** @@ -41,5 +40,4 @@ class JniJSModulesUnbundle : public JSModulesUnbundle { std::string m_moduleDirectory; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/MethodInvoker.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/MethodInvoker.cpp index 4223a449980999..6a944e6b9a33ac 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/MethodInvoker.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/MethodInvoker.cpp @@ -24,8 +24,7 @@ using namespace facebook::jni; -namespace facebook { -namespace react { +namespace facebook::react { namespace { @@ -311,5 +310,4 @@ MethodCallResult MethodInvoker::invoke( } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/MethodInvoker.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/MethodInvoker.h index f0ab0a16814434..da7cdd4ecd35bf 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/MethodInvoker.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/MethodInvoker.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class Instance; @@ -62,5 +61,4 @@ class MethodInvoker { bool isSync_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/ModuleRegistryBuilder.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/ModuleRegistryBuilder.cpp index eeb248504aaed0..2d00a652e582bc 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/ModuleRegistryBuilder.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/ModuleRegistryBuilder.cpp @@ -13,8 +13,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { std::string ModuleHolder::getName() const { static auto method = getClass()->getMethod("getName"); @@ -68,5 +67,4 @@ std::vector> buildNativeModuleList( return modules; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/ModuleRegistryBuilder.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/ModuleRegistryBuilder.h index 6f837b8f3bb194..2902dd1da19420 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/ModuleRegistryBuilder.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/ModuleRegistryBuilder.h @@ -14,8 +14,7 @@ #include "CxxModuleWrapper.h" #include "JavaModuleWrapper.h" -namespace facebook { -namespace react { +namespace facebook::react { class MessageQueueThread; @@ -36,5 +35,4 @@ std::vector> buildNativeModuleList( jni::alias_ref::javaobject> cxxModules, std::shared_ptr moduleMessageQueue); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeArray.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeArray.cpp index 6d4337877e0e7b..179cd0ab82fb6f 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeArray.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeArray.cpp @@ -11,8 +11,7 @@ using namespace facebook::jni; -namespace facebook { -namespace react { +namespace facebook::react { void NativeArray::assertInternalType() { if (!array_.isArray()) { @@ -44,5 +43,4 @@ void NativeArray::throwIfConsumed() { exceptions::throwIfObjectAlreadyConsumed(this, "Array already consumed"); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeArray.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeArray.h index 1e48e742c6bfe8..08816872d641e7 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeArray.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeArray.h @@ -12,8 +12,7 @@ #include "NativeCommon.h" -namespace facebook { -namespace react { +namespace facebook::react { class NativeArray : public jni::HybridClass { public: @@ -48,5 +47,4 @@ class NativeArray : public jni::HybridClass { NativeArray &operator=(const NativeArray &) = delete; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeCommon.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeCommon.cpp index 3b604bd06e7240..b7134f7276ff72 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeCommon.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeCommon.cpp @@ -9,8 +9,7 @@ using namespace facebook::jni; -namespace facebook { -namespace react { +namespace facebook::react { namespace exceptions { const char *gUnexpectedNativeTypeExceptionClass = @@ -61,5 +60,4 @@ local_ref ReadableType::getType(folly::dynamic::Type type) { } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeCommon.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeCommon.h index d04c3b7bd46004..cc27b94b150bc1 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeCommon.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeCommon.h @@ -14,8 +14,7 @@ #define RN_EXPORT __attribute__((visibility("default"))) #endif -namespace facebook { -namespace react { +namespace facebook::react { struct ReadableType : public jni::JavaClass { static auto constexpr kJavaDescriptor = @@ -38,5 +37,4 @@ void throwIfObjectAlreadyConsumed(const T &t, const char *msg) { } // namespace exceptions -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeMap.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeMap.cpp index ee581634e6d53c..31a01a1348884a 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeMap.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeMap.cpp @@ -11,8 +11,7 @@ using namespace facebook::jni; -namespace facebook { -namespace react { +namespace facebook::react { local_ref NativeMap::toString() { throwIfConsumed(); @@ -35,5 +34,4 @@ void NativeMap::throwIfConsumed() { exceptions::throwIfObjectAlreadyConsumed(this, "Map already consumed"); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeMap.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeMap.h index 39a42b236270d5..b61e22760e54b0 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeMap.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/NativeMap.h @@ -12,8 +12,7 @@ #include "NativeCommon.h" -namespace facebook { -namespace react { +namespace facebook::react { class NativeMap : public jni::HybridClass { public: @@ -45,5 +44,4 @@ class NativeMap : public jni::HybridClass { NativeMap &operator=(const NativeMap &) = delete; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp index 5dd3d1860981ab..58bd589c43d7ab 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp @@ -31,8 +31,7 @@ using namespace facebook::jni; -namespace facebook { -namespace react { +namespace facebook::react { namespace { @@ -93,5 +92,4 @@ extern "C" JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved) { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/OnLoad.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/OnLoad.h index b68b71bd204874..54c83cb1faae4b 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/OnLoad.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/OnLoad.h @@ -9,10 +9,8 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { jmethodID getLogMarkerMethod(); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.cpp index 45217f71ecfb5e..bd9e98fee5821a 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.cpp @@ -18,8 +18,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { const auto EXECUTOR_BASECLASS = "com/facebook/react/bridge/JavaJSExecutor"; @@ -140,5 +139,4 @@ std::string ProxyExecutor::getDescription() { return "Chrome"; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.h index 79d36e50f07462..4f05c0a9a2809e 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.h @@ -13,8 +13,7 @@ #include #include "OnLoad.h" -namespace facebook { -namespace react { +namespace facebook::react { /** * This executor factory can only create a single executor instance because it @@ -63,5 +62,4 @@ class ProxyExecutor : public JSExecutor { std::shared_ptr m_delegate; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.cpp index 397108b9642f81..833db513e2f849 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.cpp @@ -11,8 +11,7 @@ using namespace facebook::jni; -namespace facebook { -namespace react { +namespace facebook::react { // TODO T112842309: Remove after fbjni upgraded in OSS void ReadableNativeArray::mapException(const std::exception &ex) { @@ -56,5 +55,4 @@ void ReadableNativeArray::registerNatives() { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.h index 0242a4907be9ba..52ab38f0bafa9d 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.h @@ -12,8 +12,7 @@ #include "NativeCommon.h" #include "NativeMap.h" -namespace facebook { -namespace react { +namespace facebook::react { struct ReadableArray : jni::JavaClass { static auto constexpr kJavaDescriptor = @@ -41,5 +40,4 @@ class ReadableNativeArray jni::local_ref> importTypeArray(); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/ReadableNativeMap.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/ReadableNativeMap.cpp index f55a92dffb928e..6a9d554b9ac4a7 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/ReadableNativeMap.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/ReadableNativeMap.cpp @@ -9,8 +9,7 @@ using namespace facebook::jni; -namespace facebook { -namespace react { +namespace facebook::react { // TODO T112842309: Remove after fbjni upgraded in OSS void ReadableNativeMap::mapException(const std::exception &ex) { @@ -134,5 +133,4 @@ void ReadableNativeMap::registerNatives() { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/ReadableNativeMap.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/ReadableNativeMap.h index bf6a44245abfb8..2513a8a6028c27 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/ReadableNativeMap.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/ReadableNativeMap.h @@ -16,8 +16,7 @@ #include "NativeMap.h" #include "ReadableNativeArray.h" -namespace facebook { -namespace react { +namespace facebook::react { struct WritableNativeMap; @@ -50,5 +49,4 @@ struct ReadableNativeMap : jni::HybridClass { friend struct WritableNativeMap; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.cpp index 14746a38f62e15..46f34f08d9ee76 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.cpp @@ -11,8 +11,7 @@ using namespace facebook::jni; -namespace facebook { -namespace react { +namespace facebook::react { WritableNativeArray::WritableNativeArray() : HybridBase(folly::dynamic::array()) {} @@ -89,5 +88,4 @@ void WritableNativeArray::registerNatives() { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.h index fe5d8ad2e4e493..0b1224b6fc5b53 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.h @@ -13,8 +13,7 @@ #include "ReadableNativeArray.h" -namespace facebook { -namespace react { +namespace facebook::react { struct ReadableNativeMap; @@ -44,5 +43,4 @@ struct WritableNativeArray static void registerNatives(); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/WritableNativeMap.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jni/WritableNativeMap.cpp index ddb0a83343731a..a787d9c6e279ea 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/WritableNativeMap.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/WritableNativeMap.cpp @@ -9,8 +9,7 @@ using namespace facebook::jni; -namespace facebook { -namespace react { +namespace facebook::react { WritableNativeMap::WritableNativeMap() : HybridBase(folly::dynamic::object()) {} @@ -100,5 +99,4 @@ void WritableNativeMap::registerNatives() { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jni/WritableNativeMap.h b/packages/react-native/ReactAndroid/src/main/jni/react/jni/WritableNativeMap.h index 093759658cb4a2..61d153f3cf9feb 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jni/WritableNativeMap.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jni/WritableNativeMap.h @@ -14,8 +14,7 @@ #include "ReadableNativeArray.h" #include "ReadableNativeMap.h" -namespace facebook { -namespace react { +namespace facebook::react { struct WritableMap : jni::JavaClass { static auto constexpr kJavaDescriptor = @@ -46,5 +45,4 @@ struct WritableNativeMap friend HybridBase; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/jscexecutor/OnLoad.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/jscexecutor/OnLoad.cpp index d61e0706d7b216..fa9a1d2697e4fd 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/jscexecutor/OnLoad.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/jscexecutor/OnLoad.cpp @@ -15,8 +15,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { namespace { @@ -72,8 +71,7 @@ class JSCExecutorHolder using HybridBase::HybridBase; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { return facebook::jni::initialize( diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/JReadableMapBuffer.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/JReadableMapBuffer.cpp index dd5d24cfef9de8..21bf6305cecca6 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/JReadableMapBuffer.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/JReadableMapBuffer.cpp @@ -7,8 +7,7 @@ #include "JReadableMapBuffer.h" -namespace facebook { -namespace react { +namespace facebook::react { void JReadableMapBuffer::registerNatives() { registerHybrid({ @@ -39,5 +38,4 @@ JReadableMapBuffer::JReadableMapBuffer(MapBuffer &&map) (serializedData_.size() != 0) && "Error no content in map"); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/JReadableMapBuffer.h b/packages/react-native/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/JReadableMapBuffer.h index 4aae5f03e8f1a3..3db58d3bbe35bf 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/JReadableMapBuffer.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/JReadableMapBuffer.h @@ -13,8 +13,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { class JReadableMapBuffer : public jni::HybridClass { public: @@ -36,5 +35,4 @@ class JReadableMapBuffer : public jni::HybridClass { std::vector serializedData_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultComponentsRegistry.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultComponentsRegistry.cpp index 00e2cfc15ec515..8273e31777adc7 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultComponentsRegistry.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultComponentsRegistry.cpp @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { std::function)> DefaultComponentsRegistry::registerComponentDescriptorsFromEntryPoint{}; @@ -66,5 +65,4 @@ void DefaultComponentsRegistry::registerNatives() { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultComponentsRegistry.h b/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultComponentsRegistry.h index 921101b6aaface..748e6aeec82dd0 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultComponentsRegistry.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultComponentsRegistry.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class DefaultComponentsRegistry : public facebook::jni::HybridClass { @@ -43,5 +42,4 @@ class DefaultComponentsRegistry ComponentFactory *delegate); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultTurboModuleManagerDelegate.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultTurboModuleManagerDelegate.cpp index 78af98677af624..182582251bfd9f 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultTurboModuleManagerDelegate.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultTurboModuleManagerDelegate.cpp @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { std::function( const std::string &, @@ -56,5 +55,4 @@ std::shared_ptr DefaultTurboModuleManagerDelegate::getTurboModule( return rncore_ModuleProvider(name, params); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultTurboModuleManagerDelegate.h b/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultTurboModuleManagerDelegate.h index c6d37782d9b25f..bbfa17c44dcd2d 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultTurboModuleManagerDelegate.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultTurboModuleManagerDelegate.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class DefaultTurboModuleManagerDelegate : public jni::HybridClass< DefaultTurboModuleManagerDelegate, @@ -49,5 +48,4 @@ class DefaultTurboModuleManagerDelegate : public jni::HybridClass< using HybridBase::HybridBase; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/perftests/OnLoad.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/perftests/OnLoad.cpp index 06b828439d2bb5..35965eb017cb2a 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/perftests/OnLoad.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/perftests/OnLoad.cpp @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { using facebook::jni::alias_ref; @@ -207,8 +206,7 @@ static void startWatchingForLogMessage( } // namespace logwatcher } // namespace -} // namespace react -} // namespace facebook +} // namespace facebook::react using namespace facebook::react; diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.cpp index fd5e106631ca8f..7a9285653e5ca0 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.cpp @@ -13,8 +13,7 @@ using namespace facebook; -namespace facebook { -namespace react { +namespace facebook::react { static constexpr auto kBlobModuleJavaDescriptor = "com/facebook/react/modules/blob/BlobModule"; @@ -63,5 +62,4 @@ void BlobCollector::registerNatives() { {makeNativeMethod("nativeInstall", BlobCollector::nativeInstall)}); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.h b/packages/react-native/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.h index 6f0943801c35f0..d327e44a288650 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class BlobCollector : public jni::HybridClass, public jsi::HostObject { @@ -38,5 +37,4 @@ class BlobCollector : public jni::HybridClass, const std::string blobId_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/reactperflogger/reactperflogger/JNativeModulePerfLogger.h b/packages/react-native/ReactAndroid/src/main/jni/react/reactperflogger/reactperflogger/JNativeModulePerfLogger.h index 362246c7945ac7..0ae39b952a8430 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/reactperflogger/reactperflogger/JNativeModulePerfLogger.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/reactperflogger/reactperflogger/JNativeModulePerfLogger.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class JNativeModulePerfLogger : public jni::HybridClass { @@ -26,5 +25,4 @@ class JNativeModulePerfLogger friend HybridBase; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CallInvokerHolder.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CallInvokerHolder.cpp index f2d610b5e0bd8e..9b44821755b9e9 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CallInvokerHolder.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CallInvokerHolder.cpp @@ -7,8 +7,7 @@ #include "CallInvokerHolder.h" -namespace facebook { -namespace react { +namespace facebook::react { CallInvokerHolder::CallInvokerHolder(std::shared_ptr callInvoker) : _callInvoker(callInvoker) {} @@ -19,5 +18,4 @@ std::shared_ptr CallInvokerHolder::getCallInvoker() { void CallInvokerHolder::registerNatives() {} -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CallInvokerHolder.h b/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CallInvokerHolder.h index 5e64012dba8ae1..3e4b4f8f2a2767 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CallInvokerHolder.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CallInvokerHolder.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class CallInvokerHolder : public jni::HybridClass { public: @@ -28,5 +27,4 @@ class CallInvokerHolder : public jni::HybridClass { std::shared_ptr _callInvoker; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CompositeTurboModuleManagerDelegate.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CompositeTurboModuleManagerDelegate.cpp index dedcff8592ad62..4796310bca7277 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CompositeTurboModuleManagerDelegate.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CompositeTurboModuleManagerDelegate.cpp @@ -7,8 +7,7 @@ #include "CompositeTurboModuleManagerDelegate.h" -namespace facebook { -namespace react { +namespace facebook::react { jni::local_ref CompositeTurboModuleManagerDelegate::initHybrid(jni::alias_ref) { @@ -55,5 +54,4 @@ void CompositeTurboModuleManagerDelegate::addTurboModuleManagerDelegate( mDelegates_.insert(turboModuleManagerDelegate->cthis()); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CompositeTurboModuleManagerDelegate.h b/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CompositeTurboModuleManagerDelegate.h index 257d87b53b921d..46aece570b1a6d 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CompositeTurboModuleManagerDelegate.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CompositeTurboModuleManagerDelegate.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class CompositeTurboModuleManagerDelegate : public jni::HybridClass< @@ -45,5 +44,4 @@ class CompositeTurboModuleManagerDelegate turboModuleManagerDelegate); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.cpp index 840bca41145551..8b8f2c64611ff8 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.cpp @@ -19,8 +19,7 @@ #include "TurboModuleManager.h" -namespace facebook { -namespace react { +namespace facebook::react { namespace { @@ -334,5 +333,4 @@ void TurboModuleManager::installJSIBindings(bool shouldCreateLegacyModules) { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.h b/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.h index f8fa3b278b9fec..03a0ad387009a6 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.h @@ -20,8 +20,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class TurboModuleManager : public jni::HybridClass { public: @@ -67,5 +66,4 @@ class TurboModuleManager : public jni::HybridClass { TurboModuleProviderFunctionType createLegacyModuleProvider(); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManagerDelegate.h b/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManagerDelegate.h index 8e9dcb0a8e3947..e97575cf1a4a5a 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManagerDelegate.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManagerDelegate.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class TurboModuleManagerDelegate : public jni::HybridClass { @@ -33,5 +32,4 @@ class TurboModuleManagerDelegate friend HybridBase; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/uimanager/ComponentNameResolverManager.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/uimanager/ComponentNameResolverManager.cpp index ec528b53e4ba3c..15731e44c44087 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/uimanager/ComponentNameResolverManager.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/uimanager/ComponentNameResolverManager.cpp @@ -14,8 +14,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { using namespace facebook::jni; @@ -73,5 +72,4 @@ void ComponentNameResolverManager::installJSIBindings() { }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/uimanager/ComponentNameResolverManager.h b/packages/react-native/ReactAndroid/src/main/jni/react/uimanager/ComponentNameResolverManager.h index 33a667e961399e..db2a8fffc56187 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/uimanager/ComponentNameResolverManager.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/uimanager/ComponentNameResolverManager.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ComponentNameResolverManager : public facebook::jni::HybridClass { @@ -50,5 +49,4 @@ class ComponentNameResolverManager facebook::jni::alias_ref componentNameResolver); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/callinvoker/ReactCommon/CallInvoker.h b/packages/react-native/ReactCommon/callinvoker/ReactCommon/CallInvoker.h index 30996e8f83d6cc..55aa865bfad717 100644 --- a/packages/react-native/ReactCommon/callinvoker/ReactCommon/CallInvoker.h +++ b/packages/react-native/ReactCommon/callinvoker/ReactCommon/CallInvoker.h @@ -12,8 +12,7 @@ #include "SchedulerPriority.h" -namespace facebook { -namespace react { +namespace facebook::react { using CallFunc = std::function; @@ -33,5 +32,4 @@ class CallInvoker { virtual ~CallInvoker() {} }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/callinvoker/ReactCommon/SchedulerPriority.h b/packages/react-native/ReactCommon/callinvoker/ReactCommon/SchedulerPriority.h index ffa14321ef8e11..6e6a0d62e579f6 100644 --- a/packages/react-native/ReactCommon/callinvoker/ReactCommon/SchedulerPriority.h +++ b/packages/react-native/ReactCommon/callinvoker/ReactCommon/SchedulerPriority.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { enum class SchedulerPriority : int { ImmediatePriority = 1, @@ -20,5 +19,4 @@ enum class SchedulerPriority : int { IdlePriority = 5, }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/CxxModule.h b/packages/react-native/ReactCommon/cxxreact/CxxModule.h index a5a89f79423a40..c6af2bf9f1e0ca 100644 --- a/packages/react-native/ReactCommon/cxxreact/CxxModule.h +++ b/packages/react-native/ReactCommon/cxxreact/CxxModule.h @@ -16,13 +16,11 @@ using namespace std::placeholders; -namespace facebook { -namespace react { +namespace facebook::react { class Instance; -} -} // namespace facebook +} // namespace facebook::react namespace facebook { namespace xplat { diff --git a/packages/react-native/ReactCommon/cxxreact/CxxNativeModule.cpp b/packages/react-native/ReactCommon/cxxreact/CxxNativeModule.cpp index ef5c5ea532b670..53959a8112ac93 100644 --- a/packages/react-native/ReactCommon/cxxreact/CxxNativeModule.cpp +++ b/packages/react-native/ReactCommon/cxxreact/CxxNativeModule.cpp @@ -19,8 +19,7 @@ #include using facebook::xplat::module::CxxModule; -namespace facebook { -namespace react { +namespace facebook::react { std::function makeCallback( std::weak_ptr instance, @@ -257,5 +256,4 @@ void CxxNativeModule::lazyInit() { } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/CxxNativeModule.h b/packages/react-native/ReactCommon/cxxreact/CxxNativeModule.h index e9902132000e22..61d21cb14e00ef 100644 --- a/packages/react-native/ReactCommon/cxxreact/CxxNativeModule.h +++ b/packages/react-native/ReactCommon/cxxreact/CxxNativeModule.h @@ -14,8 +14,7 @@ #define RN_EXPORT __attribute__((visibility("default"))) #endif -namespace facebook { -namespace react { +namespace facebook::react { class Instance; class MessageQueueThread; @@ -66,5 +65,4 @@ class RN_EXPORT CxxNativeModule : public NativeModule { static bool shouldWarnOnUse_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/ErrorUtils.h b/packages/react-native/ReactCommon/cxxreact/ErrorUtils.h index d9e42f7d221fc6..aaf31b6502ab23 100644 --- a/packages/react-native/ReactCommon/cxxreact/ErrorUtils.h +++ b/packages/react-native/ReactCommon/cxxreact/ErrorUtils.h @@ -7,8 +7,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { inline static void handleJSError(jsi::Runtime &runtime, const jsi::JSError &error, bool isFatal) { @@ -40,5 +39,4 @@ handleJSError(jsi::Runtime &runtime, const jsi::JSError &error, bool isFatal) { } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/Instance.cpp b/packages/react-native/ReactCommon/cxxreact/Instance.cpp index 71bb1512be2865..1dfa0e682a34b6 100644 --- a/packages/react-native/ReactCommon/cxxreact/Instance.cpp +++ b/packages/react-native/ReactCommon/cxxreact/Instance.cpp @@ -30,8 +30,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { Instance::~Instance() { if (nativeToJsBridge_) { @@ -292,5 +291,4 @@ void Instance::JSCallInvoker::scheduleAsync(std::function &&work) { } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/Instance.h b/packages/react-native/ReactCommon/cxxreact/Instance.h index cf20a3529e5a86..567e72fc124a84 100644 --- a/packages/react-native/ReactCommon/cxxreact/Instance.h +++ b/packages/react-native/ReactCommon/cxxreact/Instance.h @@ -23,8 +23,7 @@ namespace folly { struct dynamic; } -namespace facebook { -namespace react { +namespace facebook::react { class JSBigString; class JSExecutorFactory; @@ -172,5 +171,4 @@ class RN_EXPORT Instance { std::make_shared(); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/JSBigString.cpp b/packages/react-native/ReactCommon/cxxreact/JSBigString.cpp index 59e117c0818e5c..436aeec9e3a8e6 100644 --- a/packages/react-native/ReactCommon/cxxreact/JSBigString.cpp +++ b/packages/react-native/ReactCommon/cxxreact/JSBigString.cpp @@ -18,8 +18,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { JSBigFileString::JSBigFileString(int fd, size_t size, off_t offset /*= 0*/) : m_fd{-1}, m_data{nullptr} { @@ -95,5 +94,4 @@ std::unique_ptr JSBigFileString::fromPath( return std::make_unique(fd, fileInfo.st_size); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/JSBigString.h b/packages/react-native/ReactCommon/cxxreact/JSBigString.h index 691bb1ac3ee5bf..79fdb666e3a71d 100644 --- a/packages/react-native/ReactCommon/cxxreact/JSBigString.h +++ b/packages/react-native/ReactCommon/cxxreact/JSBigString.h @@ -17,8 +17,7 @@ #endif #endif -namespace facebook { -namespace react { +namespace facebook::react { // JSExecutor functions sometimes take large strings, on the order of // megabytes. Copying these can be expensive. Introducing a @@ -133,5 +132,4 @@ class RN_EXPORT JSBigFileString : public JSBigString { mutable const char *m_data; // Pointer to the mmapped region. }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/JSBundleType.cpp b/packages/react-native/ReactCommon/cxxreact/JSBundleType.cpp index 8e6f17ab00822c..b869ceacf2928d 100644 --- a/packages/react-native/ReactCommon/cxxreact/JSBundleType.cpp +++ b/packages/react-native/ReactCommon/cxxreact/JSBundleType.cpp @@ -7,8 +7,7 @@ #include "JSBundleType.h" -namespace facebook { -namespace react { +namespace facebook::react { static uint32_t constexpr RAMBundleMagicNumber = 0xFB0BD1E5; @@ -38,5 +37,4 @@ bool isHermesBytecodeBundle(const BundleHeader &header) { return header.magic64 == HermesBCBundleMagicNumber; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/JSBundleType.h b/packages/react-native/ReactCommon/cxxreact/JSBundleType.h index 7a966a94b7e8f9..945e19c58ba82e 100644 --- a/packages/react-native/ReactCommon/cxxreact/JSBundleType.h +++ b/packages/react-native/ReactCommon/cxxreact/JSBundleType.h @@ -15,8 +15,7 @@ #define RN_EXPORT __attribute__((visibility("default"))) #endif -namespace facebook { -namespace react { +namespace facebook::react { /* * Scripts given to the JS Executors to run could be in any of the following @@ -71,5 +70,4 @@ RN_EXPORT const char *stringForScriptTag(const ScriptTag &tag); */ RN_EXPORT bool isHermesBytecodeBundle(const BundleHeader &header); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/JSExecutor.cpp b/packages/react-native/ReactCommon/cxxreact/JSExecutor.cpp index 7f7bfd32e99037..dbca822cf190ce 100644 --- a/packages/react-native/ReactCommon/cxxreact/JSExecutor.cpp +++ b/packages/react-native/ReactCommon/cxxreact/JSExecutor.cpp @@ -13,8 +13,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { std::string JSExecutor::getSyntheticBundlePath( uint32_t bundleId, @@ -35,5 +34,4 @@ double JSExecutor::performanceNow() { return duration / NANOSECONDS_IN_MILLISECOND; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/JSExecutor.h b/packages/react-native/ReactCommon/cxxreact/JSExecutor.h index 112426a1da4144..02dbf1928b71aa 100644 --- a/packages/react-native/ReactCommon/cxxreact/JSExecutor.h +++ b/packages/react-native/ReactCommon/cxxreact/JSExecutor.h @@ -17,8 +17,7 @@ #define RN_EXPORT __attribute__((visibility("default"))) #endif -namespace facebook { -namespace react { +namespace facebook::react { class JSBigString; class JSExecutor; @@ -142,5 +141,4 @@ class RN_EXPORT JSExecutor { static double performanceNow(); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/JSIndexedRAMBundle.cpp b/packages/react-native/ReactCommon/cxxreact/JSIndexedRAMBundle.cpp index 5be7c1b446d1bd..f1d05a06b3ba46 100644 --- a/packages/react-native/ReactCommon/cxxreact/JSIndexedRAMBundle.cpp +++ b/packages/react-native/ReactCommon/cxxreact/JSIndexedRAMBundle.cpp @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { std::function(std::string)> JSIndexedRAMBundle::buildFactory() { @@ -127,5 +126,4 @@ void JSIndexedRAMBundle::readBundle( readBundle(buffer, bytes); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/JSIndexedRAMBundle.h b/packages/react-native/ReactCommon/cxxreact/JSIndexedRAMBundle.h index a8aa34166ada38..8f5c548e916fb8 100644 --- a/packages/react-native/ReactCommon/cxxreact/JSIndexedRAMBundle.h +++ b/packages/react-native/ReactCommon/cxxreact/JSIndexedRAMBundle.h @@ -17,8 +17,7 @@ #define RN_EXPORT __attribute__((visibility("default"))) #endif -namespace facebook { -namespace react { +namespace facebook::react { class RN_EXPORT JSIndexedRAMBundle : public JSModulesUnbundle { public: @@ -69,5 +68,4 @@ class RN_EXPORT JSIndexedRAMBundle : public JSModulesUnbundle { std::unique_ptr m_startupCode; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/JSModulesUnbundle.h b/packages/react-native/ReactCommon/cxxreact/JSModulesUnbundle.h index 56376758292f7d..85bf46a7714f56 100644 --- a/packages/react-native/ReactCommon/cxxreact/JSModulesUnbundle.h +++ b/packages/react-native/ReactCommon/cxxreact/JSModulesUnbundle.h @@ -13,8 +13,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { class JSModulesUnbundle { /** @@ -44,5 +43,4 @@ class JSModulesUnbundle { JSModulesUnbundle(const JSModulesUnbundle &) = delete; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/MessageQueueThread.h b/packages/react-native/ReactCommon/cxxreact/MessageQueueThread.h index 3313b1a0fd0554..b31f2168731f88 100644 --- a/packages/react-native/ReactCommon/cxxreact/MessageQueueThread.h +++ b/packages/react-native/ReactCommon/cxxreact/MessageQueueThread.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class MessageQueueThread { public: @@ -25,5 +24,4 @@ class MessageQueueThread { virtual void quitSynchronous() = 0; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/MethodCall.cpp b/packages/react-native/ReactCommon/cxxreact/MethodCall.cpp index c5e068195d3ec0..463a31ee510b52 100644 --- a/packages/react-native/ReactCommon/cxxreact/MethodCall.cpp +++ b/packages/react-native/ReactCommon/cxxreact/MethodCall.cpp @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { #define REQUEST_MODULE_IDS 0 #define REQUEST_METHOD_IDS 1 @@ -85,5 +84,4 @@ std::vector parseMethodCalls(folly::dynamic &&jsonData) { return methodCalls; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/MethodCall.h b/packages/react-native/ReactCommon/cxxreact/MethodCall.h index f2fad2f025694d..4394bcb8247ea2 100644 --- a/packages/react-native/ReactCommon/cxxreact/MethodCall.h +++ b/packages/react-native/ReactCommon/cxxreact/MethodCall.h @@ -13,8 +13,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { struct MethodCall { int moduleId; @@ -32,5 +31,4 @@ struct MethodCall { /// \throws std::invalid_argument std::vector parseMethodCalls(folly::dynamic &&calls); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/ModuleRegistry.cpp b/packages/react-native/ReactCommon/cxxreact/ModuleRegistry.cpp index 962a84e0bacebe..75f6a350c3669e 100644 --- a/packages/react-native/ReactCommon/cxxreact/ModuleRegistry.cpp +++ b/packages/react-native/ReactCommon/cxxreact/ModuleRegistry.cpp @@ -13,8 +13,7 @@ #include "NativeModule.h" #include "SystraceSection.h" -namespace facebook { -namespace react { +namespace facebook::react { namespace { @@ -236,5 +235,4 @@ MethodCallResult ModuleRegistry::callSerializableNativeHook( methodId, std::move(params)); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/ModuleRegistry.h b/packages/react-native/ReactCommon/cxxreact/ModuleRegistry.h index 55d9c0b6b045b3..a9b5555d1f5bbe 100644 --- a/packages/react-native/ReactCommon/cxxreact/ModuleRegistry.h +++ b/packages/react-native/ReactCommon/cxxreact/ModuleRegistry.h @@ -19,8 +19,7 @@ #define RN_EXPORT __attribute__((visibility("default"))) #endif -namespace facebook { -namespace react { +namespace facebook::react { class NativeModule; @@ -88,5 +87,4 @@ class RN_EXPORT ModuleRegistry { ModuleNotFoundCallback moduleNotFoundCallback_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/NativeModule.h b/packages/react-native/ReactCommon/cxxreact/NativeModule.h index 5fa439703e1282..211eefeb333dc1 100644 --- a/packages/react-native/ReactCommon/cxxreact/NativeModule.h +++ b/packages/react-native/ReactCommon/cxxreact/NativeModule.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { struct MethodDescriptor { std::string name; @@ -41,5 +40,4 @@ class NativeModule { folly::dynamic &&args) = 0; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/NativeToJsBridge.cpp b/packages/react-native/ReactCommon/cxxreact/NativeToJsBridge.cpp index ce54a90dea0afd..456bfca43d583f 100644 --- a/packages/react-native/ReactCommon/cxxreact/NativeToJsBridge.cpp +++ b/packages/react-native/ReactCommon/cxxreact/NativeToJsBridge.cpp @@ -32,8 +32,7 @@ using fbsystrace::FbSystraceAsyncFlow; #endif -namespace facebook { -namespace react { +namespace facebook::react { // This class manages calls from JS to native code. class JsToNativeBridge : public react::ExecutorDelegate { @@ -340,5 +339,4 @@ std::shared_ptr NativeToJsBridge::getDecoratedNativeCallInvoker( return std::make_shared(m_delegate, nativeInvoker); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/NativeToJsBridge.h b/packages/react-native/ReactCommon/cxxreact/NativeToJsBridge.h index b8ba6a69c331d0..13c358614e9bba 100644 --- a/packages/react-native/ReactCommon/cxxreact/NativeToJsBridge.h +++ b/packages/react-native/ReactCommon/cxxreact/NativeToJsBridge.h @@ -20,8 +20,7 @@ namespace folly { struct dynamic; } -namespace facebook { -namespace react { +namespace facebook::react { struct InstanceCallback; class JsToNativeBridge; @@ -132,5 +131,4 @@ class NativeToJsBridge { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.cpp b/packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.cpp index 7946334dcdb149..ff3cd6b3cde72d 100644 --- a/packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.cpp +++ b/packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.cpp @@ -11,8 +11,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { constexpr uint32_t RAMBundleRegistry::MAIN_BUNDLE_ID; @@ -74,5 +73,4 @@ JSModulesUnbundle *RAMBundleRegistry::getBundle(uint32_t bundleId) const { return m_bundles.at(bundleId).get(); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.h b/packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.h index d310ef1f42c139..db6931ea2d2093 100644 --- a/packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.h +++ b/packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.h @@ -19,8 +19,7 @@ #define RN_EXPORT __attribute__((visibility("default"))) #endif -namespace facebook { -namespace react { +namespace facebook::react { class RN_EXPORT RAMBundleRegistry { public: @@ -52,5 +51,4 @@ class RN_EXPORT RAMBundleRegistry { std::unordered_map> m_bundles; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/ReactMarker.cpp b/packages/react-native/ReactCommon/cxxreact/ReactMarker.cpp index c154fccc1cb61c..a84b8d71b3aae0 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactMarker.cpp +++ b/packages/react-native/ReactCommon/cxxreact/ReactMarker.cpp @@ -8,8 +8,7 @@ #include "ReactMarker.h" #include -namespace facebook { -namespace react { +namespace facebook::react { namespace ReactMarker { #if __clang__ @@ -85,5 +84,4 @@ double StartupLogger::getRunJSBundleEndTime() { } } // namespace ReactMarker -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/ReactMarker.h b/packages/react-native/ReactCommon/cxxreact/ReactMarker.h index e0640ae672c2d1..76b8e7a165e8dc 100644 --- a/packages/react-native/ReactCommon/cxxreact/ReactMarker.h +++ b/packages/react-native/ReactCommon/cxxreact/ReactMarker.h @@ -11,8 +11,7 @@ #include #endif -namespace facebook { -namespace react { +namespace facebook::react { namespace ReactMarker { enum ReactMarkerId { @@ -87,5 +86,4 @@ class StartupLogger { }; } // namespace ReactMarker -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/RecoverableError.h b/packages/react-native/ReactCommon/cxxreact/RecoverableError.h index 4ea9fa9f91ff51..3f01dd561a81fe 100644 --- a/packages/react-native/ReactCommon/cxxreact/RecoverableError.h +++ b/packages/react-native/ReactCommon/cxxreact/RecoverableError.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /** * RecoverableError @@ -46,5 +45,4 @@ struct RecoverableError : public std::exception { std::string m_what; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/cxxreact/SystraceSection.h b/packages/react-native/ReactCommon/cxxreact/SystraceSection.h index 46996ff2bb74d9..f1579db8fc46c0 100644 --- a/packages/react-native/ReactCommon/cxxreact/SystraceSection.h +++ b/packages/react-native/ReactCommon/cxxreact/SystraceSection.h @@ -11,8 +11,7 @@ #include #endif -namespace facebook { -namespace react { +namespace facebook::react { /** * Allow providing an fbsystrace implementation that can short-circuit out @@ -57,5 +56,4 @@ struct DummySystraceSection { using SystraceSection = DummySystraceSection; #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/hermes/executor/HermesExecutorFactory.cpp b/packages/react-native/ReactCommon/hermes/executor/HermesExecutorFactory.cpp index 9d68c8c5104d48..1b4f65e4eb8d2f 100644 --- a/packages/react-native/ReactCommon/hermes/executor/HermesExecutorFactory.cpp +++ b/packages/react-native/ReactCommon/hermes/executor/HermesExecutorFactory.cpp @@ -22,8 +22,7 @@ using namespace facebook::hermes; using namespace facebook::jsi; -namespace facebook { -namespace react { +namespace facebook::react { namespace { @@ -235,5 +234,4 @@ HermesExecutor::HermesExecutor( jsi::addNativeTracingHooks(*runtime); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/hermes/executor/HermesExecutorFactory.h b/packages/react-native/ReactCommon/hermes/executor/HermesExecutorFactory.h index d0d5352ba5450e..1be5b60e215c4a 100644 --- a/packages/react-native/ReactCommon/hermes/executor/HermesExecutorFactory.h +++ b/packages/react-native/ReactCommon/hermes/executor/HermesExecutorFactory.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class HermesExecutorFactory : public JSExecutorFactory { public: @@ -59,5 +58,4 @@ class HermesExecutor : public JSIExecutor { JSIScopedTimeoutInvoker timeoutInvoker_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.cpp b/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.cpp index 0902e68b2b1644..8b25ff1e95b45d 100644 --- a/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.cpp +++ b/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.cpp @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { using facebook::react::JSErrorHandlerKey; @@ -103,5 +102,4 @@ void JsErrorHandler::handleJsError(const jsi::JSError &error, bool isFatal) { _jsErrorHandlingFunc(std::move(errorMap)); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.h b/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.h index d0bc25c908855b..a188169a670e1b 100644 --- a/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.h +++ b/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { enum JSErrorHandlerKey : uint16_t { kFrameFileName = 0, @@ -37,5 +36,4 @@ class JsErrorHandler { JsErrorHandlingFunc _jsErrorHandlingFunc; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp b/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp index 3e72ed8e25bb80..ec882e3da73a85 100644 --- a/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp +++ b/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp @@ -24,8 +24,7 @@ using namespace facebook::jsi; -namespace facebook { -namespace react { +namespace facebook::react { class JSIExecutor::NativeModuleProxy : public jsi::HostObject { public: @@ -579,5 +578,4 @@ void bindNativePerformanceNow(Runtime &runtime) { size_t count) { return Value(JSExecutor::performanceNow()); })); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h b/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h index c17a052e866d90..d5101df849f93b 100644 --- a/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h +++ b/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h @@ -17,8 +17,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { // A JSIScopedTimeoutInvoker is a trampoline-type function for introducing // timeouts. Call the TimeoutInvoker with a function to execute, the invokee. @@ -140,5 +139,4 @@ void bindNativeLogger(jsi::Runtime &runtime, Logger logger); void bindNativePerformanceNow(jsi::Runtime &runtime); double performanceNow(); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSINativeModules.cpp b/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSINativeModules.cpp index de51c93dcbfb9a..15919802a43157 100644 --- a/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSINativeModules.cpp +++ b/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSINativeModules.cpp @@ -18,8 +18,7 @@ using namespace facebook::jsi; -namespace facebook { -namespace react { +namespace facebook::react { JSINativeModules::JSINativeModules( std::shared_ptr moduleRegistry) @@ -103,5 +102,4 @@ std::optional JSINativeModules::createModule( return module; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSINativeModules.h b/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSINativeModules.h index fd769a703b40c0..365158f620715d 100644 --- a/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSINativeModules.h +++ b/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSINativeModules.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /** * Holds and creates JS representations of the modules in ModuleRegistry @@ -36,5 +35,4 @@ class JSINativeModules { const std::string &name); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/jsinspector/InspectorInterfaces.cpp b/packages/react-native/ReactCommon/jsinspector/InspectorInterfaces.cpp index fbd38e13e3df53..dc02471b9cd018 100644 --- a/packages/react-native/ReactCommon/jsinspector/InspectorInterfaces.cpp +++ b/packages/react-native/ReactCommon/jsinspector/InspectorInterfaces.cpp @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { // pure destructors in C++ are odd. You would think they don't want an // implementation, but in fact the linker requires one. Define them to be @@ -104,5 +103,4 @@ std::unique_ptr makeTestInspectorInstance() { return std::make_unique(); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/jsinspector/InspectorInterfaces.h b/packages/react-native/ReactCommon/jsinspector/InspectorInterfaces.h index 77fd6e1d546a10..115a56382c8fd9 100644 --- a/packages/react-native/ReactCommon/jsinspector/InspectorInterfaces.h +++ b/packages/react-native/ReactCommon/jsinspector/InspectorInterfaces.h @@ -24,8 +24,7 @@ #endif // _MSC_VER #endif // !defined(JSINSPECTOR_EXPORT) -namespace facebook { -namespace react { +namespace facebook::react { class IDestructible { public: @@ -90,5 +89,4 @@ extern IInspector &getInspectorInstance(); /// should only be used in tests. extern std::unique_ptr makeTestInspectorInstance(); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/bridgeless/BindingsInstaller.h b/packages/react-native/ReactCommon/react/bridgeless/BindingsInstaller.h index 3d02fd90c3accc..fc3d889a553e41 100644 --- a/packages/react-native/ReactCommon/react/bridgeless/BindingsInstaller.h +++ b/packages/react-native/ReactCommon/react/bridgeless/BindingsInstaller.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { class BindingsInstaller { public: @@ -18,5 +17,5 @@ class BindingsInstaller { return nullptr; } }; -} // namespace react -} // namespace facebook + +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/reactperflogger/reactperflogger/BridgeNativeModulePerfLogger.cpp b/packages/react-native/ReactCommon/reactperflogger/reactperflogger/BridgeNativeModulePerfLogger.cpp index 7c0da26878a1ff..616df655e099ad 100644 --- a/packages/react-native/ReactCommon/reactperflogger/reactperflogger/BridgeNativeModulePerfLogger.cpp +++ b/packages/react-native/ReactCommon/reactperflogger/reactperflogger/BridgeNativeModulePerfLogger.cpp @@ -7,8 +7,7 @@ #include "BridgeNativeModulePerfLogger.h" -namespace facebook { -namespace react { +namespace facebook::react { namespace BridgeNativeModulePerfLogger { std::unique_ptr g_perfLogger = nullptr; @@ -327,5 +326,4 @@ void asyncMethodCallExecutionFail( } } // namespace BridgeNativeModulePerfLogger -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/reactperflogger/reactperflogger/BridgeNativeModulePerfLogger.h b/packages/react-native/ReactCommon/reactperflogger/reactperflogger/BridgeNativeModulePerfLogger.h index c9593ec86f39c9..e1ed6d1cef8d25 100644 --- a/packages/react-native/ReactCommon/reactperflogger/reactperflogger/BridgeNativeModulePerfLogger.h +++ b/packages/react-native/ReactCommon/reactperflogger/reactperflogger/BridgeNativeModulePerfLogger.h @@ -9,8 +9,7 @@ #include #include "NativeModulePerfLogger.h" -namespace facebook { -namespace react { +namespace facebook::react { namespace BridgeNativeModulePerfLogger { void enableLogging(std::unique_ptr &&logger); @@ -109,5 +108,4 @@ void asyncMethodCallExecutionFail( } // namespace BridgeNativeModulePerfLogger -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/reactperflogger/reactperflogger/NativeModulePerfLogger.h b/packages/react-native/ReactCommon/reactperflogger/reactperflogger/NativeModulePerfLogger.h index 2cb386b48afb56..864ddfc1d32ebd 100644 --- a/packages/react-native/ReactCommon/reactperflogger/reactperflogger/NativeModulePerfLogger.h +++ b/packages/react-native/ReactCommon/reactperflogger/reactperflogger/NativeModulePerfLogger.h @@ -8,8 +8,7 @@ #pragma once #include -namespace facebook { -namespace react { +namespace facebook::react { /** * A platform-agnostic interface to do performance logging on NativeModules and @@ -160,5 +159,4 @@ class NativeModulePerfLogger { int32_t id) = 0; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h b/packages/react-native/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h index 1c5180918d6431..94f2b5d55f3293 100644 --- a/packages/react-native/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h +++ b/packages/react-native/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h @@ -12,8 +12,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Takes a function and calls it with a reference to a Runtime. The function @@ -125,5 +124,4 @@ inline static DataT executeSynchronouslyOnSameThread_CAN_DEADLOCK( return data; } -} // namespace react -} // namespace facebook +} // namespace facebook::react