diff --git a/packages/react-native/ReactCommon/react/bridgeless/BufferedRuntimeExecutor.cpp b/packages/react-native/ReactCommon/react/bridgeless/BufferedRuntimeExecutor.cpp index 4d30d7b4acd..378c4e491f5 100644 --- a/packages/react-native/ReactCommon/react/bridgeless/BufferedRuntimeExecutor.cpp +++ b/packages/react-native/ReactCommon/react/bridgeless/BufferedRuntimeExecutor.cpp @@ -9,8 +9,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { BufferedRuntimeExecutor::BufferedRuntimeExecutor( RuntimeExecutor runtimeExecutor) @@ -58,5 +57,4 @@ void BufferedRuntimeExecutor::unsafeFlush() { } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/bridgeless/BufferedRuntimeExecutor.h b/packages/react-native/ReactCommon/react/bridgeless/BufferedRuntimeExecutor.h index e634e1f9eb6..0b0be428785 100644 --- a/packages/react-native/ReactCommon/react/bridgeless/BufferedRuntimeExecutor.h +++ b/packages/react-native/ReactCommon/react/bridgeless/BufferedRuntimeExecutor.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class BufferedRuntimeExecutor { public: @@ -47,5 +46,4 @@ class BufferedRuntimeExecutor { std::priority_queue queue_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/bridgeless/JSEngineInstance.h b/packages/react-native/ReactCommon/react/bridgeless/JSEngineInstance.h index 4c0ebc195a1..2c8bfe03b08 100644 --- a/packages/react-native/ReactCommon/react/bridgeless/JSEngineInstance.h +++ b/packages/react-native/ReactCommon/react/bridgeless/JSEngineInstance.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /** * Interface for a class that creates and owns an instance of a JS VM @@ -23,5 +22,4 @@ class JSEngineInstance { virtual ~JSEngineInstance() = default; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/bridgeless/PlatformTimerRegistry.h b/packages/react-native/ReactCommon/react/bridgeless/PlatformTimerRegistry.h index 3aaa1630e9c..9b65875e5d5 100644 --- a/packages/react-native/ReactCommon/react/bridgeless/PlatformTimerRegistry.h +++ b/packages/react-native/ReactCommon/react/bridgeless/PlatformTimerRegistry.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /** * This interface is implemented by each platform. @@ -30,5 +29,4 @@ class PlatformTimerRegistry { using TimerManagerDelegate = PlatformTimerRegistry; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/bridgeless/ReactInstance.cpp b/packages/react-native/ReactCommon/react/bridgeless/ReactInstance.cpp index a37ee0a3efe..701780b6c55 100644 --- a/packages/react-native/ReactCommon/react/bridgeless/ReactInstance.cpp +++ b/packages/react-native/ReactCommon/react/bridgeless/ReactInstance.cpp @@ -22,8 +22,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { // Looping on \c drainMicrotasks until it completes or hits the retries bound. static void performMicrotaskCheckpoint(jsi::Runtime &runtime) { @@ -454,5 +453,4 @@ void ReactInstance::handleMemoryPressureJs(int pressureLevel) { } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/bridgeless/ReactInstance.h b/packages/react-native/ReactCommon/react/bridgeless/ReactInstance.h index 480351b3271..ee43ae9b7ff 100644 --- a/packages/react-native/ReactCommon/react/bridgeless/ReactInstance.h +++ b/packages/react-native/ReactCommon/react/bridgeless/ReactInstance.h @@ -16,8 +16,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { struct CallableModule { explicit CallableModule(jsi::Function factory) @@ -76,5 +75,4 @@ class ReactInstance final { std::shared_ptr hasFatalJsError_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/bridgeless/TimerManager.cpp b/packages/react-native/ReactCommon/react/bridgeless/TimerManager.cpp index dd87ff4ff12..b2a7e7bbf4e 100644 --- a/packages/react-native/ReactCommon/react/bridgeless/TimerManager.cpp +++ b/packages/react-native/ReactCommon/react/bridgeless/TimerManager.cpp @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { TimerManager::TimerManager( std::unique_ptr platformTimerRegistry) noexcept @@ -412,5 +411,4 @@ void TimerManager::attachGlobals(jsi::Runtime &runtime) { })); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/bridgeless/TimerManager.h b/packages/react-native/ReactCommon/react/bridgeless/TimerManager.h index 1085b159633..72907e44353 100644 --- a/packages/react-native/ReactCommon/react/bridgeless/TimerManager.h +++ b/packages/react-native/ReactCommon/react/bridgeless/TimerManager.h @@ -14,8 +14,7 @@ #include "PlatformTimerRegistry.h" -namespace facebook { -namespace react { +namespace facebook::react { /* * A HostObject subclass representing the result of a setTimeout call. @@ -113,5 +112,4 @@ class TimerManager { std::vector reactNativeMicrotasksQueue_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/bridgeless/hermes/HermesInstance.cpp b/packages/react-native/ReactCommon/react/bridgeless/hermes/HermesInstance.cpp index 3d5c91e6324..6b73c1a91c4 100644 --- a/packages/react-native/ReactCommon/react/bridgeless/hermes/HermesInstance.cpp +++ b/packages/react-native/ReactCommon/react/bridgeless/hermes/HermesInstance.cpp @@ -18,8 +18,7 @@ using namespace facebook::hermes; using namespace facebook::jsi; -namespace facebook { -namespace react { +namespace facebook::react { #ifdef HERMES_ENABLE_DEBUGGER @@ -119,5 +118,4 @@ std::unique_ptr HermesInstance::createJSRuntime( return hermesRuntime; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/bridgeless/hermes/HermesInstance.h b/packages/react-native/ReactCommon/react/bridgeless/hermes/HermesInstance.h index 050dcc2cf2c..933018ccd34 100644 --- a/packages/react-native/ReactCommon/react/bridgeless/hermes/HermesInstance.h +++ b/packages/react-native/ReactCommon/react/bridgeless/hermes/HermesInstance.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class HermesInstance { public: @@ -24,5 +23,4 @@ class HermesInstance { std::shared_ptr<::hermes::vm::CrashManager> cm) noexcept; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/bridgeless/tests/hermes/ReactInstanceTest.cpp b/packages/react-native/ReactCommon/react/bridgeless/tests/hermes/ReactInstanceTest.cpp index 7fa441818fc..63a5ccc79fc 100644 --- a/packages/react-native/ReactCommon/react/bridgeless/tests/hermes/ReactInstanceTest.cpp +++ b/packages/react-native/ReactCommon/react/bridgeless/tests/hermes/ReactInstanceTest.cpp @@ -20,8 +20,7 @@ using ::testing::_; using ::testing::SaveArg; -namespace facebook { -namespace react { +namespace facebook::react { class MockTimerRegistry : public PlatformTimerRegistry { public: @@ -866,5 +865,4 @@ function getResult() { EXPECT_EQ(result.getNumber(), 1); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/bridging/CallbackWrapper.h b/packages/react-native/ReactCommon/react/bridging/CallbackWrapper.h index 52dd1d6103d..03bb1b12ab3 100644 --- a/packages/react-native/ReactCommon/react/bridging/CallbackWrapper.h +++ b/packages/react-native/ReactCommon/react/bridging/CallbackWrapper.h @@ -12,8 +12,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { // Helper for passing jsi::Function arg to other methods. class CallbackWrapper : public LongLivedObject { @@ -63,5 +62,4 @@ class CallbackWrapper : public LongLivedObject { } }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/bridging/LongLivedObject.cpp b/packages/react-native/ReactCommon/react/bridging/LongLivedObject.cpp index f5616fd5a87..139632972aa 100644 --- a/packages/react-native/ReactCommon/react/bridging/LongLivedObject.cpp +++ b/packages/react-native/ReactCommon/react/bridging/LongLivedObject.cpp @@ -7,8 +7,7 @@ #include "LongLivedObject.h" -namespace facebook { -namespace react { +namespace facebook::react { // LongLivedObjectCollection LongLivedObjectCollection &LongLivedObjectCollection::get() { @@ -47,5 +46,4 @@ void LongLivedObject::allowRelease() { LongLivedObjectCollection::get().remove(this); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/bridging/LongLivedObject.h b/packages/react-native/ReactCommon/react/bridging/LongLivedObject.h index 2c2b5bf026e..ce51d2d52b0 100644 --- a/packages/react-native/ReactCommon/react/bridging/LongLivedObject.h +++ b/packages/react-native/ReactCommon/react/bridging/LongLivedObject.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /** * A simple wrapper class that can be registered to a collection that keep it @@ -55,5 +54,4 @@ class LongLivedObjectCollection { mutable std::mutex collectionMutex_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/config/ReactNativeConfig.cpp b/packages/react-native/ReactCommon/react/config/ReactNativeConfig.cpp index 8dedd282808..915c7737fb0 100644 --- a/packages/react-native/ReactCommon/react/config/ReactNativeConfig.cpp +++ b/packages/react-native/ReactCommon/react/config/ReactNativeConfig.cpp @@ -7,8 +7,7 @@ #include "ReactNativeConfig.h" -namespace facebook { -namespace react { +namespace facebook::react { /** * ReactNative configuration as provided by the hosting app. @@ -42,5 +41,4 @@ double EmptyReactNativeConfig::getDouble(const std::string ¶m) const { return 0.0; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/config/ReactNativeConfig.h b/packages/react-native/ReactCommon/react/config/ReactNativeConfig.h index 65ff784569d..84b388715ca 100644 --- a/packages/react-native/ReactCommon/react/config/ReactNativeConfig.h +++ b/packages/react-native/ReactCommon/react/config/ReactNativeConfig.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /** * ReactNative configuration as provided by the hosting app. @@ -40,5 +39,4 @@ class EmptyReactNativeConfig : public ReactNativeConfig { double getDouble(const std::string ¶m) const override; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.cpp b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.cpp index 1e5a1f6b6a6..71a5d3b4e0f 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.cpp @@ -15,8 +15,7 @@ using namespace facebook; using namespace facebook::xplat::module; -namespace facebook { -namespace react { +namespace facebook::react { namespace { CxxModule::Callback makeTurboCxxModuleCallback( @@ -225,5 +224,4 @@ jsi::Value TurboCxxModule::invokeMethod( return jsi::Value::undefined(); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.h b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.h index 03d19a37eb7..05460bc0f16 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.h +++ b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.h @@ -14,8 +14,7 @@ #include "TurboModule.h" -namespace facebook { -namespace react { +namespace facebook::react { /** * A helper class to convert the legacy CxxModule instance to a TurboModule @@ -47,5 +46,4 @@ class JSI_EXPORT TurboCxxModule : public TurboModule { std::unique_ptr cxxModule_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.cpp b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.cpp index ebc01af6ec7..24a328d620b 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.cpp @@ -7,8 +7,7 @@ #include "TurboModule.h" -namespace facebook { -namespace react { +namespace facebook::react { TurboModule::TurboModule( std::string name, @@ -39,5 +38,4 @@ void TurboModule::emitDeviceEvent( }); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h index ecc7e39ba28..b650483f159 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h +++ b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h @@ -14,8 +14,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /** * For now, support the same set of return types as existing impl. @@ -139,5 +138,4 @@ class JSI_EXPORT TurboModule : public facebook::jsi::HostObject { using TurboModuleProviderFunctionType = std::function(const std::string &name)>; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp index 5824bb68f7f..e85c253cdf8 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp @@ -15,8 +15,7 @@ using namespace facebook; -namespace facebook { -namespace react { +namespace facebook::react { class BridgelessNativeModuleProxy : public jsi::HostObject { std::unique_ptr binding_; @@ -207,5 +206,4 @@ jsi::Value TurboModuleBinding::getModule( } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.h b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.h index 24c82c61409..1aef473c63d 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.h +++ b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { enum class TurboModuleBindingMode : uint8_t { HostObject = 0, @@ -57,5 +56,4 @@ class TurboModuleBinding { TurboModuleProviderFunctionType moduleProvider_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModulePerfLogger.cpp b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModulePerfLogger.cpp index fc030ab94d6..bc4510c542c 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModulePerfLogger.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModulePerfLogger.cpp @@ -7,8 +7,7 @@ #include "TurboModulePerfLogger.h" -namespace facebook { -namespace react { +namespace facebook::react { namespace TurboModulePerfLogger { std::unique_ptr g_perfLogger = nullptr; @@ -327,5 +326,4 @@ void asyncMethodCallExecutionFail( } } // namespace TurboModulePerfLogger -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModulePerfLogger.h b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModulePerfLogger.h index e0b1b013f85..b9ab37475b7 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModulePerfLogger.h +++ b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModulePerfLogger.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { namespace TurboModulePerfLogger { void enableLogging(std::unique_ptr &&logger); void disableLogging(); @@ -108,5 +107,4 @@ void asyncMethodCallExecutionFail( int32_t id); } // namespace TurboModulePerfLogger -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.cpp b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.cpp index 866277587de..2e9fcf25ada 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.cpp @@ -7,8 +7,7 @@ #include "TurboModuleUtils.h" -namespace facebook { -namespace react { +namespace facebook::react { static jsi::Value deepCopyJSIValue(jsi::Runtime &rt, const jsi::Value &value) { if (value.isNull()) { @@ -101,5 +100,4 @@ jsi::Value createPromiseAsJSIValue( return JSPromise.callAsConstructor(rt, fn); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.h b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.h index 0bc4a864327..e79af7d32cf 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.h +++ b/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.h @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { jsi::Object deepCopyJSIObject(jsi::Runtime &rt, const jsi::Object &obj); jsi::Array deepCopyJSIArray(jsi::Runtime &rt, const jsi::Array &arr); @@ -56,5 +55,4 @@ class RAIICallbackWrapperDestroyer { std::weak_ptr callbackWrapper_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaInteropTurboModule.cpp b/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaInteropTurboModule.cpp index 65ec533d5d6..d9d2befdd1b 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaInteropTurboModule.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaInteropTurboModule.cpp @@ -7,8 +7,7 @@ #include "JavaInteropTurboModule.h" -namespace facebook { -namespace react { +namespace facebook::react { namespace { @@ -188,5 +187,4 @@ std::vector JavaInteropTurboModule::getPropertyNames( return propNames; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaInteropTurboModule.h b/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaInteropTurboModule.h index 331a6c80d00..dc198917a58 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaInteropTurboModule.h +++ b/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaInteropTurboModule.h @@ -16,8 +16,7 @@ #include "JavaTurboModule.h" -namespace facebook { -namespace react { +namespace facebook::react { class JSI_EXPORT JavaInteropTurboModule : public JavaTurboModule { public: @@ -48,5 +47,4 @@ class JSI_EXPORT JavaInteropTurboModule : public JavaTurboModule { bool exportsConstants(); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp b/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp index dc5a4d74efd..35fbba1af84 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp @@ -24,8 +24,7 @@ #include "JavaTurboModule.h" -namespace facebook { -namespace react { +namespace facebook::react { namespace TMPL = TurboModulePerfLogger; @@ -850,5 +849,4 @@ jsi::Value JavaTurboModule::invokeJavaMethod( } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.h b/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.h index 89881890bc4..950d3db3aad 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.h +++ b/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.h @@ -17,8 +17,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { struct JTurboModule : jni::JavaClass { static auto constexpr kJavaDescriptor = @@ -53,5 +52,4 @@ class JSI_EXPORT JavaTurboModule : public TurboModule { std::shared_ptr nativeInvoker_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.h b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.h index 555c22b0eab..b971372e9b8 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.h +++ b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.h @@ -23,8 +23,7 @@ ((RCTTurboModuleEnabled() && [(klass) conformsToProtocol:@protocol(RCTTurboModule)])) #define RCT_IS_TURBO_MODULE_INSTANCE(module) RCT_IS_TURBO_MODULE_CLASS([(module) class]) -namespace facebook { -namespace react { +namespace facebook::react { class CallbackWrapper; class Instance; @@ -93,8 +92,7 @@ class JSI_EXPORT ObjCTurboModule : public TurboModule { jsi::Value createPromise(jsi::Runtime &runtime, std::string methodName, PromiseInvocationBlock invoke); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react @protocol RCTTurboModule - (std::shared_ptr)getTurboModule: diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm index e56672ad0dd..7a1ca33ccc2 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm +++ b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm @@ -211,8 +211,7 @@ convertJSIFunctionToCallback(jsi::Runtime &runtime, const jsi::Function &value, return [callback copy]; } -namespace facebook { -namespace react { +namespace facebook::react { jsi::Value ObjCTurboModule::createPromise(jsi::Runtime &runtime, std::string methodName, PromiseInvocationBlock invoke) { @@ -724,5 +723,4 @@ void ObjCTurboModule::setMethodArgConversionSelector(NSString *methodName, int a methodArgConversionSelectors_[methodName][argIndex] = selectorValue; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/NativeSampleTurboCxxModuleSpecJSI.cpp b/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/NativeSampleTurboCxxModuleSpecJSI.cpp index 4a40f935c88..4429c8c9b99 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/NativeSampleTurboCxxModuleSpecJSI.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/NativeSampleTurboCxxModuleSpecJSI.cpp @@ -9,8 +9,7 @@ // NOTE: This entire file should be codegen'ed. -namespace facebook { -namespace react { +namespace facebook::react { static jsi::Value __hostFunction_NativeSampleTurboCxxModuleSpecJSI_voidFunc( jsi::Runtime &rt, @@ -149,5 +148,4 @@ NativeSampleTurboCxxModuleSpecJSI::NativeSampleTurboCxxModuleSpecJSI( 0, __hostFunction_NativeSampleTurboCxxModuleSpecJSI_getConstants}; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/NativeSampleTurboCxxModuleSpecJSI.h b/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/NativeSampleTurboCxxModuleSpecJSI.h index 2b4b342586c..a551ff4b166 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/NativeSampleTurboCxxModuleSpecJSI.h +++ b/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/NativeSampleTurboCxxModuleSpecJSI.h @@ -12,8 +12,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { // TODO: This definition should be codegen'ed for type-safety purpose. class JSI_EXPORT NativeSampleTurboCxxModuleSpecJSI : public TurboModule { @@ -40,5 +39,4 @@ class JSI_EXPORT NativeSampleTurboCxxModuleSpecJSI : public TurboModule { virtual jsi::Object getConstants(jsi::Runtime &rt) = 0; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/SampleTurboCxxModule.cpp b/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/SampleTurboCxxModule.cpp index 9b3fff0c685..34c54283d17 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/SampleTurboCxxModule.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/SampleTurboCxxModule.cpp @@ -11,8 +11,7 @@ using namespace facebook; -namespace facebook { -namespace react { +namespace facebook::react { SampleTurboCxxModule::SampleTurboCxxModule( std::shared_ptr jsInvoker) @@ -94,5 +93,4 @@ jsi::Object SampleTurboCxxModule::getConstants(jsi::Runtime &rt) { return result; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/SampleTurboCxxModule.h b/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/SampleTurboCxxModule.h index 8d397ae5a64..923adb597af 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/SampleTurboCxxModule.h +++ b/packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/SampleTurboCxxModule.h @@ -11,8 +11,7 @@ #include "NativeSampleTurboCxxModuleSpecJSI.h" -namespace facebook { -namespace react { +namespace facebook::react { /** * A sample implementation of the C++ spec. In practice, this class can just @@ -41,5 +40,4 @@ class SampleTurboCxxModule : public NativeSampleTurboCxxModuleSpecJSI { jsi::Object getConstants(jsi::Runtime &rt) override; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.cpp b/packages/react-native/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.cpp index 93330d45d01..355daaa0179 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.cpp @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc( @@ -361,5 +360,4 @@ std::shared_ptr SampleTurboModuleSpec_ModuleProvider( return nullptr; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.h b/packages/react-native/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.h index 0754f9a9bba..82f79006ee1 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.h +++ b/packages/react-native/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /** * C++ class for module 'SampleTurboModule' @@ -28,5 +27,4 @@ std::shared_ptr SampleTurboModuleSpec_ModuleProvider( const std::string &moduleName, const JavaTurboModule::InitParams ¶ms); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTNativeSampleTurboModuleSpec.h b/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTNativeSampleTurboModuleSpec.h index 89e369c44cf..be0835f7d42 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTNativeSampleTurboModuleSpec.h +++ b/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTNativeSampleTurboModuleSpec.h @@ -43,8 +43,7 @@ @end -namespace facebook { -namespace react { +namespace facebook::react { /** * The iOS TurboModule impl specific to SampleTurboModule. @@ -54,5 +53,4 @@ class JSI_EXPORT NativeSampleTurboModuleSpecJSI : public ObjCTurboModule { NativeSampleTurboModuleSpecJSI(const ObjCTurboModule::InitParams ¶ms); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTNativeSampleTurboModuleSpec.mm b/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTNativeSampleTurboModuleSpec.mm index ebc97ece2d9..de9e39504c3 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTNativeSampleTurboModuleSpec.mm +++ b/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTNativeSampleTurboModuleSpec.mm @@ -7,8 +7,7 @@ #import "RCTNativeSampleTurboModuleSpec.h" -namespace facebook { -namespace react { +namespace facebook::react { static facebook::jsi::Value __hostFunction_NativeSampleTurboModuleSpecJSI_voidFunc( facebook::jsi::Runtime &rt, @@ -227,5 +226,4 @@ NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(const ObjCTurboMo methodMap_["getConstants"] = MethodMetadata{0, __hostFunction_NativeSampleTurboModuleSpecJSI_getConstants}; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/SampleTurboCxxModuleLegacyImpl.cpp b/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/SampleTurboCxxModuleLegacyImpl.cpp index 5b90e17106d..29ae0f7d205 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/SampleTurboCxxModuleLegacyImpl.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/SampleTurboCxxModuleLegacyImpl.cpp @@ -11,8 +11,7 @@ using namespace facebook::xplat::module; -namespace facebook { -namespace react { +namespace facebook::react { SampleTurboCxxModuleLegacyImpl::SampleTurboCxxModuleLegacyImpl() {} @@ -175,5 +174,4 @@ void SampleTurboCxxModuleLegacyImpl::getValueWithPromise( } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/SampleTurboCxxModuleLegacyImpl.h b/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/SampleTurboCxxModuleLegacyImpl.h index b360a02d24f..7b3cbc90ca6 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/SampleTurboCxxModuleLegacyImpl.h +++ b/packages/react-native/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/SampleTurboCxxModuleLegacyImpl.h @@ -9,8 +9,7 @@ #import -namespace facebook { -namespace react { +namespace facebook::react { /** * A sample CxxModule (legacy system) implementation. @@ -44,5 +43,4 @@ class SampleTurboCxxModuleLegacyImpl const facebook::xplat::module::CxxModule::Callback &reject); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationCallbackWrapper.h b/packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationCallbackWrapper.h index f4e1ebf0ac4..eef642690fd 100644 --- a/packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationCallbackWrapper.h +++ b/packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationCallbackWrapper.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class LayoutAnimationCallbackWrapper { public: @@ -30,5 +29,4 @@ class LayoutAnimationCallbackWrapper { mutable std::shared_ptr callback_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationDriver.h b/packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationDriver.h index b495413042f..43179f038f0 100644 --- a/packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationDriver.h +++ b/packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationDriver.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class LayoutAnimationDriver : public LayoutAnimationKeyFrameManager { public: @@ -32,5 +31,4 @@ class LayoutAnimationDriver : public LayoutAnimationKeyFrameManager { uint64_t now) const override; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h b/packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h index 18c356d2cf3..6d0d541c1cf 100644 --- a/packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h +++ b/packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h @@ -21,8 +21,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { #ifdef LAYOUT_ANIMATION_VERBOSE_LOGGING void PrintMutationInstruction( @@ -176,5 +175,4 @@ class LayoutAnimationKeyFrameManager : public UIManagerAnimationDelegate, ShadowViewMutationList const &mutations) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/animations/conversions.h b/packages/react-native/ReactCommon/react/renderer/animations/conversions.h index 021399b9f7f..e033dc7840f 100644 --- a/packages/react-native/ReactCommon/react/renderer/animations/conversions.h +++ b/packages/react-native/ReactCommon/react/renderer/animations/conversions.h @@ -10,8 +10,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { static inline std::optional parseAnimationType( std::string param) { @@ -208,5 +207,4 @@ static inline std::optional parseLayoutAnimationConfig( duration, *createConfig, *updateConfig, *deleteConfig}; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/animations/primitives.h b/packages/react-native/ReactCommon/react/renderer/animations/primitives.h index 91cd7e32490..4c2fdaa1a8a 100644 --- a/packages/react-native/ReactCommon/react/renderer/animations/primitives.h +++ b/packages/react-native/ReactCommon/react/renderer/animations/primitives.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { // This corresponds exactly with JS. enum class AnimationType { @@ -101,5 +100,4 @@ struct LayoutAnimation { std::vector keyFrames; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/animations/utils.h b/packages/react-native/ReactCommon/react/renderer/animations/utils.h index 752025ae137..3018d937405 100644 --- a/packages/react-native/ReactCommon/react/renderer/animations/utils.h +++ b/packages/react-native/ReactCommon/react/renderer/animations/utils.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { static inline bool shouldFirstComeBeforeSecondRemovesOnly( ShadowViewMutation const &lhs, @@ -77,5 +76,4 @@ std::pair calculateAnimationProgress( LayoutAnimation const &animation, AnimationConfig const &mutationConfig); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/AttributedString.h b/packages/react-native/ReactCommon/react/renderer/attributedstring/AttributedString.h index 69ef92b379a..483fbe805ef 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/AttributedString.h +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/AttributedString.h @@ -17,8 +17,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class AttributedString; @@ -117,8 +116,7 @@ class AttributedString : public Sealable, public DebugStringConvertible { Fragments fragments_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react namespace std { template <> diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/AttributedStringBox.h b/packages/react-native/ReactCommon/react/renderer/attributedstring/AttributedStringBox.h index 770386aef31..4702a73b79a 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/AttributedStringBox.h +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/AttributedStringBox.h @@ -11,8 +11,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Represents an object storing a shared `AttributedString` or a shared pointer @@ -61,8 +60,7 @@ class AttributedStringBox final { bool operator==(AttributedStringBox const &lhs, AttributedStringBox const &rhs); bool operator!=(AttributedStringBox const &lhs, AttributedStringBox const &rhs); -} // namespace react -} // namespace facebook +} // namespace facebook::react template <> struct std::hash { diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.h b/packages/react-native/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.h index f5f87c6cf52..510454d366e 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.h +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ParagraphAttributes; @@ -81,8 +80,7 @@ class ParagraphAttributes : public DebugStringConvertible { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react namespace std { diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.h b/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.h index f53ad73f60e..fd552ca7817 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.h +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.h @@ -20,8 +20,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class TextAttributes; @@ -98,8 +97,7 @@ class TextAttributes : public DebugStringConvertible { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react namespace std { diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/conversions.h b/packages/react-native/ReactCommon/react/renderer/attributedstring/conversions.h index 2a3f7bccc5f..20383dd113b 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/conversions.h +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/conversions.h @@ -30,8 +30,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { inline std::string toString(const DynamicTypeRamp &dynamicTypeRamp) { switch (dynamicTypeRamp) { @@ -1306,5 +1305,4 @@ inline MapBuffer toMapBuffer(const AttributedString &attributedString) { #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/primitives.h b/packages/react-native/ReactCommon/react/renderer/attributedstring/primitives.h index f3ef237c9a8..75c5ce77f0d 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/primitives.h +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/primitives.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { enum class FontStyle { Normal, Italic, Oblique }; @@ -151,8 +150,7 @@ enum class HyphenationFrequency { Full // Standard amount of hyphenation. }; -} // namespace react -} // namespace facebook +} // namespace facebook::react namespace std { template <> diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/tests/AttributedStringTest.cpp b/packages/react-native/ReactCommon/react/renderer/attributedstring/tests/AttributedStringTest.cpp index 466c76f9737..ba91c0c1b34 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/tests/AttributedStringTest.cpp +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/tests/AttributedStringTest.cpp @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { #ifdef ANDROID @@ -43,5 +42,4 @@ TEST(AttributedStringTest, testToDynamic) { #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/tests/TextAttributesTest.cpp b/packages/react-native/ReactCommon/react/renderer/attributedstring/tests/TextAttributesTest.cpp index fdb3251de55..fec5388b31e 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/tests/TextAttributesTest.cpp +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/tests/TextAttributesTest.cpp @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { #ifdef ANDROID @@ -35,5 +34,4 @@ TEST(TextAttributesTest, testToDynamic) { #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorFactory.h b/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorFactory.h index 5d1c8b022d3..2bbcce62a40 100644 --- a/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorFactory.h +++ b/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorFactory.h @@ -15,8 +15,7 @@ #include "ComponentDescriptorRegistry.h" -namespace facebook { -namespace react { +namespace facebook::react { /** * A factory to provide hosting app specific set of ComponentDescriptor's. @@ -30,5 +29,4 @@ using ComponentRegistryFactory = ComponentRegistryFactory getDefaultComponentRegistryFactory(); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProvider.h b/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProvider.h index 10f8e14cbb6..2ac212d23c5 100644 --- a/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProvider.h +++ b/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProvider.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Callable signature that represents the signature of `ComponentDescriptor` @@ -70,5 +69,4 @@ ComponentDescriptorProvider concreteComponentDescriptorProvider() { &concreteComponentDescriptorConstructor}; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h b/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h index d905063a7a4..b2a9d9ab780 100644 --- a/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h +++ b/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ComponentDescriptorProviderRequest = std::function; @@ -67,5 +66,4 @@ class ComponentDescriptorProviderRegistry final { componentDescriptorProviderRequest_{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.h b/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.h index 4a83a4efb89..8c5cfe31009 100644 --- a/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.h +++ b/packages/react-native/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.h @@ -16,8 +16,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ComponentDescriptorProviderRegistry; class ComponentDescriptorRegistry; @@ -91,5 +90,4 @@ class ComponentDescriptorRegistry { ContextContainer::Shared contextContainer_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/componentregistry/componentNameByReactViewName.h b/packages/react-native/ReactCommon/react/renderer/componentregistry/componentNameByReactViewName.h index ab6b9c9fc4f..a37d9fd0c88 100644 --- a/packages/react-native/ReactCommon/react/renderer/componentregistry/componentNameByReactViewName.h +++ b/packages/react-native/ReactCommon/react/renderer/componentregistry/componentNameByReactViewName.h @@ -9,13 +9,11 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /** * Provides mapping from old view name format to the new format. */ std::string componentNameByReactViewName(std::string viewName); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/componentregistry/native/NativeComponentRegistryBinding.h b/packages/react-native/ReactCommon/react/renderer/componentregistry/native/NativeComponentRegistryBinding.h index a728c23586e..ce60ff514d5 100644 --- a/packages/react-native/ReactCommon/react/renderer/componentregistry/native/NativeComponentRegistryBinding.h +++ b/packages/react-native/ReactCommon/react/renderer/componentregistry/native/NativeComponentRegistryBinding.h @@ -11,8 +11,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /** * An app/platform-specific provider function to determine if a component @@ -57,5 +56,4 @@ class NativeComponentRegistryBinding { HasComponentProviderFunctionType hasComponentProvider_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/image/ImageComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/image/ImageComponentDescriptor.h index 69bc565ee2a..ae8040185ef 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/image/ImageComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/image/ImageComponentDescriptor.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Descriptor for component. @@ -40,5 +39,4 @@ class ImageComponentDescriptor final const SharedImageManager imageManager_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/image/ImageEventEmitter.h b/packages/react-native/ReactCommon/react/renderer/components/image/ImageEventEmitter.h index d4fa125ea72..2305938e681 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/image/ImageEventEmitter.h +++ b/packages/react-native/ReactCommon/react/renderer/components/image/ImageEventEmitter.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { class ImageEventEmitter : public ViewEventEmitter { public: @@ -24,5 +23,4 @@ class ImageEventEmitter : public ViewEventEmitter { void onPartialLoad() const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/image/ImageProps.h b/packages/react-native/ReactCommon/react/renderer/components/image/ImageProps.h index 6c1e4c35361..af152bf9b0f 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/image/ImageProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/image/ImageProps.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { // TODO (T28334063): Consider for codegen. class ImageProps final : public ViewProps { @@ -39,5 +38,4 @@ class ImageProps final : public ViewProps { std::string internal_analyticTag{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/image/ImageShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/image/ImageShadowNode.h index 4376eda4a58..402fa5b93b2 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/image/ImageShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/image/ImageShadowNode.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ImageComponentName[]; @@ -61,5 +60,4 @@ class ImageShadowNode final : public ConcreteViewShadowNode< void updateStateIfNeeded(); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/image/ImageState.h b/packages/react-native/ReactCommon/react/renderer/components/image/ImageState.h index 281d395658f..9d2d61a0c39 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/image/ImageState.h +++ b/packages/react-native/ReactCommon/react/renderer/components/image/ImageState.h @@ -15,8 +15,7 @@ #include #endif -namespace facebook { -namespace react { +namespace facebook::react { /* * State for component. @@ -66,5 +65,4 @@ class ImageState final { Float const blurRadius_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/image/conversions.h b/packages/react-native/ReactCommon/react/renderer/components/image/conversions.h index d2c8e499ee7..8075e59d1eb 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/image/conversions.h +++ b/packages/react-native/ReactCommon/react/renderer/components/image/conversions.h @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { inline void fromRawValue( const PropsParserContext &context, @@ -139,5 +138,4 @@ inline std::string toString(const ImageResizeMode &value) { } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryComponentDescriptor.h index c579ba5d407..5f2117fbc90 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryComponentDescriptor.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Descriptor for component. @@ -42,5 +41,4 @@ class InputAccessoryComponentDescriptor final } }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryShadowNode.cpp b/packages/react-native/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryShadowNode.cpp index d806054883e..47fb82a620b 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryShadowNode.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryShadowNode.cpp @@ -7,10 +7,8 @@ #include "InputAccessoryShadowNode.h" -namespace facebook { -namespace react { +namespace facebook::react { extern const char InputAccessoryComponentName[] = "InputAccessoryView"; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryShadowNode.h index 595c23bc86f..ae0809cb57a 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryShadowNode.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char InputAccessoryComponentName[]; @@ -35,5 +34,4 @@ class InputAccessoryShadowNode final : public ConcreteViewShadowNode< } }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryState.h b/packages/react-native/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryState.h index 81cfdd387e5..e415c67681e 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryState.h +++ b/packages/react-native/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryState.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * State for component. @@ -24,5 +23,4 @@ class InputAccessoryState final { const Size viewportSize{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.h index 4838a88d092..d3e538cba99 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class LegacyViewManagerInteropComponentDescriptor final : public ConcreteComponentDescriptor { @@ -34,5 +33,4 @@ class LegacyViewManagerInteropComponentDescriptor final std::shared_ptr const _coordinator; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm index 9b8e78b2dd6..67846a66342 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +++ b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm @@ -16,8 +16,7 @@ #include "LegacyViewManagerInteropState.h" #include "RCTLegacyViewManagerInteropCoordinator.h" -namespace facebook { -namespace react { +namespace facebook::react { static std::string moduleNameFromComponentName(const std::string &componentName) { @@ -117,5 +116,4 @@ void LegacyViewManagerInteropComponentDescriptor::adopt(ShadowNode::Unshared con legacyViewManagerInteropShadowNode->setStateData(std::move(state)); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropShadowNode.cpp b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropShadowNode.cpp index e99f7c390b5..81ddc89db1f 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropShadowNode.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropShadowNode.cpp @@ -5,11 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -namespace facebook { -namespace react { +namespace facebook::react { extern const char LegacyViewManagerInteropComponentName[] = "LegacyViewManagerInterop"; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropShadowNode.h index da7b3691f74..c3d44690a10 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropShadowNode.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char LegacyViewManagerInteropComponentName[]; @@ -23,5 +22,4 @@ using LegacyViewManagerInteropShadowNode = ConcreteViewShadowNode< LegacyViewManagerInteropViewEventEmitter, LegacyViewManagerInteropState>; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropState.h b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropState.h index 90b5cb8934f..d3ef25302a3 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropState.h +++ b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropState.h @@ -9,8 +9,7 @@ #import -namespace facebook { -namespace react { +namespace facebook::react { /* * State for component. @@ -20,5 +19,4 @@ class LegacyViewManagerInteropState final { std::shared_ptr coordinator; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropState.mm b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropState.mm index 85ce2b0b5ac..aa8c9ed8f40 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropState.mm +++ b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropState.mm @@ -7,7 +7,5 @@ #include "LegacyViewManagerInteropState.h" -namespace facebook { -namespace react { -} // namespace react -} // namespace facebook +namespace facebook::react { +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewEventEmitter.cpp b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewEventEmitter.cpp index 39c0ec67043..35b5556d59c 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewEventEmitter.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewEventEmitter.cpp @@ -8,13 +8,11 @@ #include "LegacyViewManagerInteropViewEventEmitter.h" #include -namespace facebook { -namespace react { +namespace facebook::react { void LegacyViewManagerInteropViewEventEmitter::dispatchEvent( std::string const &type, folly::dynamic const &payload) const { EventEmitter::dispatchEvent(type, payload); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewEventEmitter.h b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewEventEmitter.h index 2a4abecfa9a..ceb7a4e6cfd 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewEventEmitter.h +++ b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewEventEmitter.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class LegacyViewManagerInteropViewEventEmitter; @@ -29,5 +28,4 @@ class LegacyViewManagerInteropViewEventEmitter : public ViewEventEmitter { const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.cpp b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.cpp index 36771139bd9..3832ce5901c 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.cpp @@ -8,8 +8,7 @@ #include "LegacyViewManagerInteropViewProps.h" #include -namespace facebook { -namespace react { +namespace facebook::react { LegacyViewManagerInteropViewProps::LegacyViewManagerInteropViewProps( const PropsParserContext &context, @@ -20,5 +19,4 @@ LegacyViewManagerInteropViewProps::LegacyViewManagerInteropViewProps( mergeDynamicProps(sourceProps.otherProps, (folly::dynamic)rawProps)) { } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.h b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.h index fa684aab402..84fcbfc809d 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class LegacyViewManagerInteropViewProps final : public ViewProps { public: @@ -26,5 +25,4 @@ class LegacyViewManagerInteropViewProps final : public ViewProps { folly::dynamic const otherProps; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/UnstableLegacyViewManagerInteropComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/UnstableLegacyViewManagerInteropComponentDescriptor.h index f61e723a06e..a7b08aba4d0 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/UnstableLegacyViewManagerInteropComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/UnstableLegacyViewManagerInteropComponentDescriptor.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Descriptor for component. @@ -34,5 +33,4 @@ class UnstableLegacyViewManagerInteropComponentDescriptor private: }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewComponentDescriptor.h index 0ff4d14d9ac..dbb7c40a964 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewComponentDescriptor.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Descriptor for component. @@ -43,5 +42,4 @@ class ModalHostViewComponentDescriptor final } }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewShadowNode.h index 5558e0ef125..7c832dc0ca5 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewShadowNode.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ModalHostViewComponentName[]; @@ -35,5 +34,4 @@ class ModalHostViewShadowNode final : public ConcreteViewShadowNode< } }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewState.h b/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewState.h index dd5f7a5a400..ae002a029bf 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewState.h +++ b/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewState.h @@ -16,8 +16,7 @@ #include #endif -namespace facebook { -namespace react { +namespace facebook::react { /* * State for component. @@ -51,5 +50,4 @@ class ModalHostViewState final { #pragma mark - Getters }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarComponentDescriptor.h index cd8ea223515..6dc1ce41a1a 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarComponentDescriptor.h @@ -11,8 +11,7 @@ #include "AndroidProgressBarMeasurementsManager.h" #include "AndroidProgressBarShadowNode.h" -namespace facebook { -namespace react { +namespace facebook::react { /* * Descriptor for component. @@ -48,5 +47,4 @@ class AndroidProgressBarComponentDescriptor final measurementsManager_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.h b/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.h index 7755ed37161..8959916b6e8 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.h +++ b/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class AndroidProgressBarMeasurementsManager { public: @@ -34,5 +33,4 @@ class AndroidProgressBarMeasurementsManager { mutable Size cachedMeasurement_{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarShadowNode.h index 65d0de57cdb..682bb32455e 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarShadowNode.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char AndroidProgressBarComponentName[]; @@ -42,5 +41,4 @@ class AndroidProgressBarShadowNode final : public ConcreteViewShadowNode< std::shared_ptr measurementsManager_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/conversions.h b/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/conversions.h index dc3c1474777..baec542e625 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/conversions.h +++ b/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/conversions.h @@ -9,8 +9,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { #ifdef ANDROID inline folly::dynamic toDynamic(AndroidProgressBarProps const &props) { @@ -26,5 +25,4 @@ inline folly::dynamic toDynamic(AndroidProgressBarProps const &props) { } #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/root/RootComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/root/RootComponentDescriptor.h index c031b7eeb35..8f63c52396b 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/root/RootComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/root/RootComponentDescriptor.h @@ -10,10 +10,8 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { using RootComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/root/RootProps.h b/packages/react-native/ReactCommon/react/renderer/components/root/RootProps.h index 6ba7952c495..d2238a0ecb4 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/root/RootProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/root/RootProps.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class RootProps final : public ViewProps { public: @@ -36,5 +35,4 @@ class RootProps final : public ViewProps { LayoutContext layoutContext{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/root/RootShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/root/RootShadowNode.h index aa6a5f8343d..d15ea235a5d 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/root/RootShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/root/RootShadowNode.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class RootShadowNode; @@ -59,5 +58,4 @@ class RootShadowNode final Transform getTransform() const override; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewComponentDescriptor.h index de0dcb4a905..09134eb9abd 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewComponentDescriptor.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Descriptor for component. @@ -43,5 +42,4 @@ class SafeAreaViewComponentDescriptor final } }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewShadowNode.cpp b/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewShadowNode.cpp index e4b821d3141..ead5d086512 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewShadowNode.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewShadowNode.cpp @@ -7,10 +7,8 @@ #include "SafeAreaViewShadowNode.h" -namespace facebook { -namespace react { +namespace facebook::react { extern const char SafeAreaViewComponentName[] = "SafeAreaView"; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewShadowNode.h index c4b312d90aa..64ca6231394 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewShadowNode.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char SafeAreaViewComponentName[]; @@ -35,5 +34,4 @@ class SafeAreaViewShadowNode final : public ConcreteViewShadowNode< } }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewState.cpp b/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewState.cpp index 2238b0793d8..da495d27eba 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewState.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewState.cpp @@ -7,6 +7,4 @@ #include "SafeAreaViewState.h" -namespace facebook { -namespace react {} // namespace react -} // namespace facebook +namespace facebook::react {} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewState.h b/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewState.h index 6216cf664ab..aa4c45b5d4f 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewState.h +++ b/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewState.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * State for component. @@ -20,5 +19,4 @@ class SafeAreaViewState final { EdgeInsets padding{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewComponentDescriptor.h index 3f6dd76720b..bde164951fa 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewComponentDescriptor.h @@ -10,11 +10,9 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { using ScrollViewComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewEventEmitter.h b/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewEventEmitter.h index 868441d5f97..09e81622b99 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewEventEmitter.h +++ b/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewEventEmitter.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ScrollViewMetrics { public: @@ -42,5 +41,4 @@ class ScrollViewEventEmitter : public ViewEventEmitter { EventPriority priority = EventPriority::AsynchronousBatched) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.h b/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.h index c76c99eddda..dea44da3af5 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.h @@ -13,8 +13,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { // TODO (T28334063): Consider for codegen. class ScrollViewProps final : public ViewProps { @@ -77,5 +76,4 @@ class ScrollViewProps final : public ViewProps { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewShadowNode.h index c34367e8c55..e4949ada81c 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewShadowNode.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ScrollViewComponentName[]; @@ -39,5 +38,4 @@ class ScrollViewShadowNode final : public ConcreteViewShadowNode< void updateScrollContentOffsetIfNeeded(); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewState.h b/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewState.h index 7d767b52e8f..2692831f9ef 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewState.h +++ b/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewState.h @@ -18,8 +18,7 @@ #include #endif -namespace facebook { -namespace react { +namespace facebook::react { /* * State for component. @@ -55,5 +54,4 @@ class ScrollViewState final { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/scrollview/conversions.h b/packages/react-native/ReactCommon/react/renderer/components/scrollview/conversions.h index 3c888b48132..c8740c37776 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/scrollview/conversions.h +++ b/packages/react-native/ReactCommon/react/renderer/components/scrollview/conversions.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { inline void fromRawValue( const PropsParserContext &context, @@ -179,5 +178,4 @@ inline std::string toString( #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/scrollview/primitives.h b/packages/react-native/ReactCommon/react/renderer/components/scrollview/primitives.h index e627d767fa2..80adadd8f07 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/scrollview/primitives.h +++ b/packages/react-native/ReactCommon/react/renderer/components/scrollview/primitives.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { enum class ScrollViewSnapToAlignment { Start, Center, End }; @@ -40,5 +39,4 @@ class ScrollViewMaintainVisibleContentPosition final { } }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchComponentDescriptor.h index aefde23b9c9..5ce046bebe5 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchComponentDescriptor.h @@ -12,8 +12,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Descriptor for component. @@ -47,5 +46,4 @@ class AndroidSwitchComponentDescriptor final const std::shared_ptr measurementsManager_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchMeasurementsManager.h b/packages/react-native/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchMeasurementsManager.h index ebf7eaea64c..555ed4de5f0 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchMeasurementsManager.h +++ b/packages/react-native/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchMeasurementsManager.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class AndroidSwitchMeasurementsManager { public: @@ -29,5 +28,4 @@ class AndroidSwitchMeasurementsManager { mutable Size cachedMeasurement_{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchShadowNode.h index 4b990444147..bf43b67944d 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchShadowNode.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char AndroidSwitchComponentName[]; @@ -43,5 +42,4 @@ class AndroidSwitchShadowNode final : public ConcreteViewShadowNode< std::shared_ptr measurementsManager_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/BaseTextProps.h b/packages/react-native/ReactCommon/react/renderer/components/text/BaseTextProps.h index 82369e28069..3f33881e2f7 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/BaseTextProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/text/BaseTextProps.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * `Props`-like class which is used as a base class for all Props classes @@ -44,5 +43,4 @@ class BaseTextProps { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/BaseTextShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/text/BaseTextShadowNode.h index 17a29b1e769..911e059bd31 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/BaseTextShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/text/BaseTextShadowNode.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Base class (one of) for shadow nodes that represents attributed text, @@ -66,5 +65,4 @@ class BaseTextShadowNode { } }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphComponentDescriptor.h index 2909ebbc57a..3d76dc9306c 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphComponentDescriptor.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Descriptor for component. @@ -44,5 +43,4 @@ class ParagraphComponentDescriptor final std::shared_ptr textLayoutManager_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphEventEmitter.h b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphEventEmitter.h index c7e306d75ed..8c9d275dbde 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphEventEmitter.h +++ b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphEventEmitter.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ParagraphEventEmitter : public ViewEventEmitter { public: @@ -24,5 +23,4 @@ class ParagraphEventEmitter : public ViewEventEmitter { mutable LinesMeasurements linesMeasurementsMetrics_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.h b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.h index 86a9224c3e1..eff1d101867 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.h @@ -16,8 +16,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Props of component. @@ -60,5 +59,4 @@ class ParagraphProps : public ViewProps, public BaseTextProps { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h index b24063766e6..de99875b5c2 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h @@ -16,8 +16,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { extern char const ParagraphComponentName[]; @@ -101,5 +100,4 @@ class ParagraphShadowNode final : public ConcreteViewShadowNode< mutable std::optional content_{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/RawTextComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/text/RawTextComponentDescriptor.h index 163bdb5c600..1f50f7afc44 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/RawTextComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/text/RawTextComponentDescriptor.h @@ -10,11 +10,9 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { using RawTextComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/RawTextProps.h b/packages/react-native/ReactCommon/react/renderer/components/text/RawTextProps.h index 7d448b374db..609612929ba 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/RawTextProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/text/RawTextProps.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class RawTextProps; @@ -39,5 +38,4 @@ class RawTextProps : public Props { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/RawTextShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/text/RawTextShadowNode.h index bd62a4af3f1..15d211b9d19 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/RawTextShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/text/RawTextShadowNode.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char RawTextComponentName[]; @@ -37,5 +36,4 @@ class RawTextShadowNode : public ConcreteShadowNode< } }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/TextComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/text/TextComponentDescriptor.h index 85612690049..067dfefba20 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/TextComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/text/TextComponentDescriptor.h @@ -10,10 +10,8 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { using TextComponentDescriptor = ConcreteComponentDescriptor; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/TextProps.h b/packages/react-native/ReactCommon/react/renderer/components/text/TextProps.h index 38502bc40ef..52b2195d0a5 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/TextProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/text/TextProps.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class TextProps : public Props, public BaseTextProps { public: @@ -37,5 +36,4 @@ class TextProps : public Props, public BaseTextProps { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/TextShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/text/TextShadowNode.h index 3c252a212f5..c6efc9aa6ed 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/TextShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/text/TextShadowNode.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char TextComponentName[]; @@ -62,5 +61,4 @@ class TextShadowNode : public ConcreteShadowNode< #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/conversions.h b/packages/react-native/ReactCommon/react/renderer/components/text/conversions.h index a4a90aa37c9..756e969e82e 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/conversions.h +++ b/packages/react-native/ReactCommon/react/renderer/components/text/conversions.h @@ -13,8 +13,7 @@ #include #endif -namespace facebook { -namespace react { +namespace facebook::react { #ifdef ANDROID inline folly::dynamic toDynamic(ParagraphState const ¶graphState) { @@ -37,5 +36,4 @@ inline MapBuffer toMapBuffer(ParagraphState const ¶graphState) { } #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/tests/ParagraphLocalDataTest.cpp b/packages/react-native/ReactCommon/react/renderer/components/text/tests/ParagraphLocalDataTest.cpp index afa6723bc43..8b91ffd3c3c 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/tests/ParagraphLocalDataTest.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/text/tests/ParagraphLocalDataTest.cpp @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { #ifdef ANDROID @@ -50,5 +49,4 @@ TEST(ParagraphLocalDataTest, testSomething) { #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputComponentDescriptor.h index 1eea5143b4e..87b22b503bb 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputComponentDescriptor.h @@ -17,8 +17,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Descriptor for component. @@ -181,5 +180,4 @@ class AndroidTextInputComponentDescriptor final mutable butter::map surfaceIdToThemePaddingMap_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputEventEmitter.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputEventEmitter.h index e9b4bd44510..688c7e4c084 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputEventEmitter.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputEventEmitter.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { // This emitter exists only as a placeholder and is not used for communication // with JS. @@ -23,5 +22,4 @@ class AndroidTextInputEventEmitter : public ViewEventEmitter { using ViewEventEmitter::ViewEventEmitter; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputProps.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputProps.h index 7652984ce15..66e89a77b0e 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputProps.h @@ -24,8 +24,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { struct AndroidTextInputSelectionStruct { int start; @@ -190,5 +189,4 @@ class AndroidTextInputProps final : public ViewProps, public BaseTextProps { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h index d79d8e51059..220131a471a 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h @@ -16,8 +16,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char AndroidTextInputComponentName[]; @@ -84,5 +83,4 @@ class AndroidTextInputShadowNode final : public ConcreteViewShadowNode< mutable std::optional cachedAttributedString_{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputState.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputState.h index 58adf0aaed4..b794ab14cc4 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputState.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputState.h @@ -17,8 +17,7 @@ #include #endif -namespace facebook { -namespace react { +namespace facebook::react { /* * State for component. @@ -81,5 +80,4 @@ class AndroidTextInputState final { MapBuffer getMapBuffer() const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputComponentDescriptor.h index 63900758c9b..c1a900be843 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputComponentDescriptor.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Descriptor for component. @@ -39,5 +38,4 @@ class TextInputComponentDescriptor final std::shared_ptr textLayoutManager_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputEventEmitter.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputEventEmitter.h index 2e7e2f79ea9..5e684c261e6 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputEventEmitter.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputEventEmitter.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class TextInputMetrics { public: @@ -61,5 +60,4 @@ class TextInputEventEmitter : public ViewEventEmitter { EventPriority priority = EventPriority::AsynchronousBatched) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputProps.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputProps.h index bede7451767..c123d6039c8 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputProps.h @@ -20,8 +20,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class TextInputProps final : public ViewProps, public BaseTextProps { public: @@ -78,5 +77,4 @@ class TextInputProps final : public ViewProps, public BaseTextProps { ParagraphAttributes getEffectiveParagraphAttributes() const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputShadowNode.h index 105ed7805ab..defdece7e14 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputShadowNode.h @@ -16,8 +16,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char TextInputComponentName[]; @@ -79,5 +78,4 @@ class TextInputShadowNode final : public ConcreteViewShadowNode< std::shared_ptr textLayoutManager_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputState.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputState.h index 68572c09e21..fa147b86df9 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputState.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/TextInputState.h @@ -17,8 +17,7 @@ #include #endif -namespace facebook { -namespace react { +namespace facebook::react { /* * State for component. @@ -67,5 +66,4 @@ class TextInputState final { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/conversions.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/conversions.h index f8b16d24add..98aaf830506 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/conversions.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/conversions.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { inline void fromRawValue( const PropsParserContext &context, @@ -238,5 +237,4 @@ inline void fromRawValue( abort(); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/primitives.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/primitives.h index bbb56d26d9a..9fadc3d23ed 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/primitives.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/primitives.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { // iOS & Android. enum class AutocapitalizationType { @@ -225,5 +224,4 @@ class TextInputTraits final { std::string passwordRules{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/propsConversions.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/propsConversions.h index d3cdf58f32f..f498ed38519 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/propsConversions.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/iostextinput/react/renderer/components/iostextinput/propsConversions.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { static TextInputTraits convertRawProp( const PropsParserContext &context, @@ -179,5 +178,4 @@ inline void fromRawValue( LOG(ERROR) << "Unsupported Selection type"; } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewComponentDescriptor.h index 3ae47a556da..b6731e31e6e 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewComponentDescriptor.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Descriptor for component. @@ -39,5 +38,4 @@ class UnimplementedViewComponentDescriptor final RawProps const &rawProps) const override; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewProps.h b/packages/react-native/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewProps.h index 87794e2f312..9daf3bc283c 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewProps.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * It's a normal `ViewProps` with additional information about the component @@ -32,5 +31,4 @@ class UnimplementedViewProps final : public ViewProps { mutable ComponentName componentName_{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewShadowNode.h index a6d141aacf7..405c81e647f 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewShadowNode.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char UnimplementedViewComponentName[]; @@ -19,5 +18,4 @@ using UnimplementedViewShadowNode = ConcreteViewShadowNode< UnimplementedViewComponentName, UnimplementedViewProps>; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h b/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h index a1b369a587b..6e934df39f5 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { enum class AccessibilityTraits : uint32_t { None = 0, @@ -137,5 +136,4 @@ enum class AccessibilityLiveRegion : uint8_t { Assertive, }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.h b/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.h index 630e7617b52..87f60e7b14c 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class AccessibilityProps { public: @@ -67,5 +66,4 @@ class AccessibilityProps { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPropsMapBuffer.cpp b/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPropsMapBuffer.cpp index 01111a63a9f..c866cb23a46 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPropsMapBuffer.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPropsMapBuffer.cpp @@ -8,8 +8,7 @@ #include "AccessibilityPropsMapBuffer.h" #include "AccessibilityProps.h" -namespace facebook { -namespace react { +namespace facebook::react { #ifdef ANDROID @@ -162,5 +161,4 @@ void AccessibilityProps::propsDiffMapBuffer( } #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPropsMapBuffer.h b/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPropsMapBuffer.h index 16b5202774f..37dd41eeec9 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPropsMapBuffer.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityPropsMapBuffer.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { constexpr MapBuffer::Key AP_ACCESSIBILITY_ACTIONS = 0; constexpr MapBuffer::Key AP_ACCESSIBILITY_HINT = 1; @@ -30,6 +29,5 @@ constexpr MapBuffer::Key AP_IMPORTANT_FOR_ACCESSIBILITY = 19; constexpr MapBuffer::Key ACCESSIBILITY_ACTION_NAME = 0; constexpr MapBuffer::Key ACCESSIBILITY_ACTION_LABEL = 1; -} // namespace react -} // namespace facebook +} // namespace facebook::react #endif diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/ConcreteViewShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/view/ConcreteViewShadowNode.h index 045a5d752c6..eb40350b0c5 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/ConcreteViewShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/ConcreteViewShadowNode.h @@ -16,8 +16,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Template for all -like classes (classes which have all same props @@ -120,5 +119,4 @@ class ConcreteViewShadowNode : public ConcreteShadowNode< } }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/PointerEvent.h b/packages/react-native/ReactCommon/react/renderer/components/view/PointerEvent.h index 6b0022eeb9b..03ad6a1699b 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/PointerEvent.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/PointerEvent.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { struct PointerEvent { /* @@ -121,5 +120,4 @@ std::vector getDebugProps( #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/Touch.h b/packages/react-native/ReactCommon/react/renderer/components/view/Touch.h index 14afeb52dd8..cf540f24071 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/Touch.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/Touch.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Describes an individual touch point for a touch event. @@ -85,5 +84,4 @@ std::vector getDebugProps( #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/TouchEvent.h b/packages/react-native/ReactCommon/react/renderer/components/view/TouchEvent.h index ad0e918f454..84746292a11 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/TouchEvent.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/TouchEvent.h @@ -13,8 +13,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Defines the `touchstart`, `touchend`, `touchmove`, and `touchcancel` event @@ -49,5 +48,4 @@ std::vector getDebugProps( #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/TouchEventEmitter.h b/packages/react-native/ReactCommon/react/renderer/components/view/TouchEventEmitter.h index b039c7cdc0b..ad42dfa7674 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/TouchEventEmitter.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/TouchEventEmitter.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class TouchEventEmitter; @@ -53,5 +52,4 @@ class TouchEventEmitter : public EventEmitter { RawEvent::Category category) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/ViewComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/view/ViewComponentDescriptor.h index f9e04afb07e..a84d8179682 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/ViewComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/ViewComponentDescriptor.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ViewComponentDescriptor : public ConcreteComponentDescriptor { @@ -20,5 +19,4 @@ class ViewComponentDescriptor : ConcreteComponentDescriptor(parameters) {} }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/ViewEventEmitter.h b/packages/react-native/ReactCommon/react/renderer/components/view/ViewEventEmitter.h index 5ff128454b1..2267fac1ed0 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/ViewEventEmitter.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/ViewEventEmitter.h @@ -15,8 +15,7 @@ #include "TouchEventEmitter.h" -namespace facebook { -namespace react { +namespace facebook::react { class ViewEventEmitter; @@ -69,5 +68,4 @@ class ViewEventEmitter : public TouchEventEmitter { std::make_shared()}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/ViewProps.h b/packages/react-native/ReactCommon/react/renderer/components/view/ViewProps.h index 084626dcc36..8b6a8445fe8 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/ViewProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/ViewProps.h @@ -18,8 +18,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { class ViewProps; @@ -110,5 +109,4 @@ class ViewProps : public YogaStylableProps, public AccessibilityProps { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h b/packages/react-native/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h index dfbd0fc3802..99cbd582d27 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /** * Given animation progress, old props, new props, and an "interpolated" shared @@ -53,5 +52,4 @@ static inline void interpolateViewProps( #endif } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/ViewPropsMapBuffer.cpp b/packages/react-native/ReactCommon/react/renderer/components/view/ViewPropsMapBuffer.cpp index f72767c16bf..3967bee5461 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/ViewPropsMapBuffer.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/view/ViewPropsMapBuffer.cpp @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { // TODO: Currently unsupported: nextFocusForward/Left/Up/Right/Down void ViewProps::propsDiffMapBuffer( @@ -192,7 +191,6 @@ void ViewProps::propsDiffMapBuffer( } } -} // namespace react -} // namespace facebook +} // namespace facebook::react #endif diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/ViewPropsMapBuffer.h b/packages/react-native/ReactCommon/react/renderer/components/view/ViewPropsMapBuffer.h index 3a12d2d40aa..7574b0c14cb 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/ViewPropsMapBuffer.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/ViewPropsMapBuffer.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { #ifdef ANDROID constexpr MapBuffer::Key VP_BACKFACE_VISIBILITY = 9; @@ -51,5 +50,4 @@ constexpr MapBuffer::Key YG_BORDER_WIDTH = 100; constexpr MapBuffer::Key YG_OVERFLOW = 101; #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/ViewShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/view/ViewShadowNode.h index d62f63ed6b8..12bbd2e240f 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/ViewShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/ViewShadowNode.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { extern const char ViewComponentName[]; @@ -54,5 +53,4 @@ class ViewShadowNode final : public ConcreteViewShadowNode< void initialize() noexcept; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.h index 7dcd333ae2c..9ad7f28cf03 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.h @@ -19,8 +19,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class YogaLayoutableShadowNode : public LayoutableShadowNode { using CompactValue = facebook::yoga::detail::CompactValue; @@ -202,5 +201,4 @@ class YogaLayoutableShadowNode : public LayoutableShadowNode { ListOfShared yogaLayoutableChildren_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/YogaStylableProps.h b/packages/react-native/ReactCommon/react/renderer/components/view/YogaStylableProps.h index 6371bb3dc70..b3bc8c6af49 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/YogaStylableProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/YogaStylableProps.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class YogaStylableProps : public Props { using CompactValue = facebook::yoga::detail::CompactValue; @@ -86,5 +85,4 @@ class YogaStylableProps : public Props { RawProps const &rawProps); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/YogaStylablePropsMapBuffer.cpp b/packages/react-native/ReactCommon/react/renderer/components/view/YogaStylablePropsMapBuffer.cpp index ac8a3c2ad55..da0459265f1 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/YogaStylablePropsMapBuffer.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/view/YogaStylablePropsMapBuffer.cpp @@ -14,8 +14,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { MapBuffer convertBorderWidths(YGStyle::Edges const &border) { MapBufferBuilder builder(7); @@ -81,7 +80,6 @@ void YogaStylableProps::propsDiffMapBuffer( } } -} // namespace react -} // namespace facebook +} // namespace facebook::react #endif diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/YogaStylablePropsMapBuffer.h b/packages/react-native/ReactCommon/react/renderer/components/view/YogaStylablePropsMapBuffer.h index 69b0e419b71..2d0c7c1456c 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/YogaStylablePropsMapBuffer.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/YogaStylablePropsMapBuffer.h @@ -11,14 +11,12 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { // Yoga values constexpr MapBuffer::Key YG_BORDER_WIDTH = 100; constexpr MapBuffer::Key YG_OVERFLOW = 101; -} // namespace react -} // namespace facebook +} // namespace facebook::react #endif diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/accessibilityPropsConversions.h b/packages/react-native/ReactCommon/react/renderer/components/view/accessibilityPropsConversions.h index b6b16a7cc47..cc918cb9e2c 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/accessibilityPropsConversions.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/accessibilityPropsConversions.h @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { inline void fromString(const std::string &string, AccessibilityTraits &result) { if (string == "none") { @@ -299,5 +298,4 @@ inline void fromRawValue( } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/conversions.h b/packages/react-native/ReactCommon/react/renderer/components/view/conversions.h index ad087df7877..c5dc7d638c0 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/conversions.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/conversions.h @@ -24,8 +24,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Yoga's `float` <-> React Native's `Float` (can be `double` or `float`) @@ -855,5 +854,4 @@ inline std::string toString(const YGStyle::Edges &value) { return "{" + result + "}"; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/primitives.h b/packages/react-native/ReactCommon/react/renderer/components/view/primitives.h index f489c95d1b9..04daf6e3367 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/primitives.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/primitives.h @@ -16,8 +16,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { enum class PointerEventsMode : uint8_t { Auto, None, BoxNone, BoxOnly }; @@ -320,5 +319,4 @@ struct NativeDrawable { #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/propsConversions.h b/packages/react-native/ReactCommon/react/renderer/components/view/propsConversions.h index b2fbafbd804..704a00f404c 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/propsConversions.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/propsConversions.h @@ -13,8 +13,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { // Nearly this entire file can be deleted when iterator-style Prop parsing // ships fully for View @@ -779,5 +778,4 @@ static inline void fromRawValue( #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/viewPropConversions.h b/packages/react-native/ReactCommon/react/renderer/components/view/viewPropConversions.h index a21df7eab05..bb45be5cf49 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/viewPropConversions.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/viewPropConversions.h @@ -16,8 +16,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { namespace { @@ -212,5 +211,4 @@ inline MapBuffer convertTransform(Transform const &transform) { } } // namespace -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/BatchedEventQueue.h b/packages/react-native/ReactCommon/react/renderer/core/BatchedEventQueue.h index f663321f02f..bc3e5a669d7 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/BatchedEventQueue.h +++ b/packages/react-native/ReactCommon/react/renderer/core/BatchedEventQueue.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Event Queue that dispatches event in batches synchronizing them with @@ -26,5 +25,4 @@ class BatchedEventQueue final : public EventQueue { void onEnqueue() const override; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/ComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/core/ComponentDescriptor.h index 84d35c6c1f5..a0d6f137a89 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/core/ComponentDescriptor.h @@ -17,8 +17,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ComponentDescriptorParameters; class ComponentDescriptor; @@ -158,5 +157,4 @@ class ComponentDescriptorParameters { ComponentDescriptor::Flavor flavor; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h index 5a9cf373898..7d4d690a6d9 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h @@ -22,8 +22,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Default template-based implementation of ComponentDescriptor. @@ -213,5 +212,4 @@ class ConcreteComponentDescriptor : public ComponentDescriptor { } }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/ConcreteShadowNode.h b/packages/react-native/ReactCommon/react/renderer/core/ConcreteShadowNode.h index e8bbf9d08fd..f61677645df 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ConcreteShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/core/ConcreteShadowNode.h @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Base templace class for all `ShadowNode`s which connects exact `ShadowNode` @@ -132,5 +131,4 @@ class ConcreteShadowNode : public BaseShadowNodeT { } }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/ConcreteState.h b/packages/react-native/ReactCommon/react/renderer/core/ConcreteState.h index d7615e3926b..952437e43ef 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ConcreteState.h +++ b/packages/react-native/ReactCommon/react/renderer/core/ConcreteState.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Concrete and only template implementation of State interface. @@ -111,5 +110,4 @@ class ConcreteState : public State { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/CoreFeatures.cpp b/packages/react-native/ReactCommon/react/renderer/core/CoreFeatures.cpp index bda8adb91a6..f095e117ec8 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/CoreFeatures.cpp +++ b/packages/react-native/ReactCommon/react/renderer/core/CoreFeatures.cpp @@ -7,8 +7,7 @@ #include "CoreFeatures.h" -namespace facebook { -namespace react { +namespace facebook::react { bool CoreFeatures::enablePropIteratorSetter = false; bool CoreFeatures::enableMapBuffer = false; @@ -17,5 +16,4 @@ bool CoreFeatures::useNativeState = false; bool CoreFeatures::cacheNSTextStorage = false; bool CoreFeatures::cacheLastTextMeasurement = false; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/CoreFeatures.h b/packages/react-native/ReactCommon/react/renderer/core/CoreFeatures.h index 45defe2afd1..69b7f87d3b5 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/CoreFeatures.h +++ b/packages/react-native/ReactCommon/react/renderer/core/CoreFeatures.h @@ -7,8 +7,7 @@ #pragma once -namespace facebook { -namespace react { +namespace facebook::react { /* * Contains the set of feature flags for the renderer core. @@ -46,5 +45,4 @@ class CoreFeatures { static bool cacheLastTextMeasurement; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/EventBeat.h b/packages/react-native/ReactCommon/react/renderer/core/EventBeat.h index 10245c572e2..e56987664b0 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/EventBeat.h +++ b/packages/react-native/ReactCommon/react/renderer/core/EventBeat.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Event Beat serves two interleaving purposes: synchronization of event queues @@ -87,5 +86,4 @@ class EventBeat { mutable std::atomic isRequested_{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/EventDispatcher.h b/packages/react-native/ReactCommon/react/renderer/core/EventDispatcher.h index 6dd3e28f7c7..08b44a05411 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/EventDispatcher.h +++ b/packages/react-native/ReactCommon/react/renderer/core/EventDispatcher.h @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { struct RawEvent; @@ -76,5 +75,4 @@ class EventDispatcher { mutable EventListenerContainer eventListeners_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/EventEmitter.h b/packages/react-native/ReactCommon/react/renderer/core/EventEmitter.h index d0fba333089..36eae1ad1ff 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/EventEmitter.h +++ b/packages/react-native/ReactCommon/react/renderer/core/EventEmitter.h @@ -16,8 +16,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class EventEmitter; @@ -102,5 +101,4 @@ class EventEmitter { mutable bool isEnabled_{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/EventHandler.h b/packages/react-native/ReactCommon/react/renderer/core/EventHandler.h index 6deb74bf83b..b650d8f161c 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/EventHandler.h +++ b/packages/react-native/ReactCommon/react/renderer/core/EventHandler.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * We need this types only to ensure type-safety when we deal with them. @@ -26,5 +25,4 @@ struct EventHandler { }; using UniqueEventHandler = std::unique_ptr; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/EventListener.h b/packages/react-native/ReactCommon/react/renderer/core/EventListener.h index f72a41614c8..0b86f1a68ff 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/EventListener.h +++ b/packages/react-native/ReactCommon/react/renderer/core/EventListener.h @@ -12,8 +12,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /** * Listener for events dispatched to JS runtime. @@ -39,5 +38,4 @@ class EventListenerContainer { std::vector> eventListeners_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/EventPipe.h b/packages/react-native/ReactCommon/react/renderer/core/EventPipe.h index e64281fc686..53d41488418 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/EventPipe.h +++ b/packages/react-native/ReactCommon/react/renderer/core/EventPipe.h @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { using EventPipe = std::function; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/EventPriority.h b/packages/react-native/ReactCommon/react/renderer/core/EventPriority.h index bde3b9a36aa..bc1e9aa9b49 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/EventPriority.h +++ b/packages/react-native/ReactCommon/react/renderer/core/EventPriority.h @@ -7,8 +7,7 @@ #pragma once -namespace facebook { -namespace react { +namespace facebook::react { enum class EventPriority { SynchronousUnbatched, @@ -22,5 +21,4 @@ enum class EventPriority { Deferred = AsynchronousBatched }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/EventQueue.h b/packages/react-native/ReactCommon/react/renderer/core/EventQueue.h index 3a3196dbb52..8549063ceb7 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/EventQueue.h +++ b/packages/react-native/ReactCommon/react/renderer/core/EventQueue.h @@ -17,8 +17,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Event Queue synchronized with given Event Beat and dispatching event @@ -72,5 +71,4 @@ class EventQueue { mutable bool hasContinuousEventStarted_{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/EventQueueProcessor.h b/packages/react-native/ReactCommon/react/renderer/core/EventQueueProcessor.h index 8fa3433ea41..e2e81c14d2b 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/EventQueueProcessor.h +++ b/packages/react-native/ReactCommon/react/renderer/core/EventQueueProcessor.h @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class EventQueueProcessor { public: @@ -32,5 +31,4 @@ class EventQueueProcessor { mutable bool hasContinuousEventStarted_{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/EventTarget.h b/packages/react-native/ReactCommon/react/renderer/core/EventTarget.h index 8807ef4b280..f6b29947805 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/EventTarget.h +++ b/packages/react-native/ReactCommon/react/renderer/core/EventTarget.h @@ -11,8 +11,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * `EventTarget` represents storage of a weak instance handle object with some @@ -74,5 +73,4 @@ class EventTarget { using SharedEventTarget = std::shared_ptr; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/LayoutConstraints.h b/packages/react-native/ReactCommon/react/renderer/core/LayoutConstraints.h index 4212e972234..96089757f18 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/LayoutConstraints.h +++ b/packages/react-native/ReactCommon/react/renderer/core/LayoutConstraints.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Unified layout constraints for measuring. @@ -46,8 +45,7 @@ inline bool operator!=( return !(lhs == rhs); } -} // namespace react -} // namespace facebook +} // namespace facebook::react namespace std { template <> diff --git a/packages/react-native/ReactCommon/react/renderer/core/LayoutContext.h b/packages/react-native/ReactCommon/react/renderer/core/LayoutContext.h index 04d6b298028..727382530f6 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/LayoutContext.h +++ b/packages/react-native/ReactCommon/react/renderer/core/LayoutContext.h @@ -11,8 +11,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * LayoutContext: Additional contextual information useful for particular @@ -81,5 +80,4 @@ inline bool operator!=(LayoutContext const &lhs, LayoutContext const &rhs) { return !(lhs == rhs); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/LayoutMetrics.h b/packages/react-native/ReactCommon/react/renderer/core/LayoutMetrics.h index da69829292d..f28ba3322fb 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/LayoutMetrics.h +++ b/packages/react-native/ReactCommon/react/renderer/core/LayoutMetrics.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Describes results of layout process for particular shadow node. @@ -85,8 +84,7 @@ std::vector getDebugProps( #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react namespace std { diff --git a/packages/react-native/ReactCommon/react/renderer/core/LayoutPrimitives.h b/packages/react-native/ReactCommon/react/renderer/core/LayoutPrimitives.h index aa1845172fd..f3bc1d91ee0 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/LayoutPrimitives.h +++ b/packages/react-native/ReactCommon/react/renderer/core/LayoutPrimitives.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Defines visibility of the shadow node and particular layout @@ -32,8 +31,7 @@ enum class LayoutDirection { RightToLeft = 2, }; -} // namespace react -} // namespace facebook +} // namespace facebook::react namespace std { template <> diff --git a/packages/react-native/ReactCommon/react/renderer/core/LayoutableShadowNode.h b/packages/react-native/ReactCommon/react/renderer/core/LayoutableShadowNode.h index 4fd992081c8..b16213ad8f8 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/LayoutableShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/core/LayoutableShadowNode.h @@ -20,8 +20,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { struct LayoutConstraints; struct LayoutContext; @@ -165,5 +164,4 @@ class LayoutableShadowNode : public ShadowNode { LayoutMetrics layoutMetrics_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/Props.h b/packages/react-native/ReactCommon/react/renderer/core/Props.h index 91b3e7ab567..8818ee413f2 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/Props.h +++ b/packages/react-native/ReactCommon/react/renderer/core/Props.h @@ -20,8 +20,7 @@ #include #endif -namespace facebook { -namespace react { +namespace facebook::react { /* * Represents the most generic props object. @@ -65,5 +64,4 @@ class Props : public virtual Sealable, public virtual DebugStringConvertible { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/PropsMapBuffer.cpp b/packages/react-native/ReactCommon/react/renderer/core/PropsMapBuffer.cpp index f1b2252a28b..c4f8c1153b9 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/PropsMapBuffer.cpp +++ b/packages/react-native/ReactCommon/react/renderer/core/PropsMapBuffer.cpp @@ -10,8 +10,7 @@ #ifdef ANDROID -namespace facebook { -namespace react { +namespace facebook::react { void Props::propsDiffMapBuffer( Props const *oldPropsPtr, @@ -31,6 +30,5 @@ void Props::propsDiffMapBuffer( } } -} // namespace react -} // namespace facebook +} // namespace facebook::react #endif diff --git a/packages/react-native/ReactCommon/react/renderer/core/PropsMapBuffer.h b/packages/react-native/ReactCommon/react/renderer/core/PropsMapBuffer.h index ba9bc958556..66d1d97b610 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/PropsMapBuffer.h +++ b/packages/react-native/ReactCommon/react/renderer/core/PropsMapBuffer.h @@ -12,13 +12,11 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { constexpr MapBuffer::Key PROPS_MAX = 1; constexpr MapBuffer::Key PROPS_NATIVE_ID = 1; -} // namespace react -} // namespace facebook +} // namespace facebook::react #endif diff --git a/packages/react-native/ReactCommon/react/renderer/core/PropsParserContext.h b/packages/react-native/ReactCommon/react/renderer/core/PropsParserContext.h index 7297fbba321..04ec16f72f1 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/PropsParserContext.h +++ b/packages/react-native/ReactCommon/react/renderer/core/PropsParserContext.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { // For props requiring some context to parse, this toolbox can be used. // It should be used as infrequently as possible - most props can and should @@ -25,5 +24,4 @@ struct PropsParserContext { ContextContainer const &contextContainer; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/RawEvent.h b/packages/react-native/ReactCommon/react/renderer/core/RawEvent.h index 43ce761cddb..d9ec02c796e 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/RawEvent.h +++ b/packages/react-native/ReactCommon/react/renderer/core/RawEvent.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Represents ready-to-dispatch event object. @@ -72,5 +71,4 @@ struct RawEvent { EventTag loggingTag{0}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/RawProps.h b/packages/react-native/ReactCommon/react/renderer/core/RawProps.h index 3f3aae117bc..e4108a89899 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/RawProps.h +++ b/packages/react-native/ReactCommon/react/renderer/core/RawProps.h @@ -21,8 +21,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class RawPropsParser; @@ -142,5 +141,4 @@ class RawProps final { values_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/RawPropsKey.h b/packages/react-native/ReactCommon/react/renderer/core/RawPropsKey.h index 510600cddec..a721b6d8fe1 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/RawPropsKey.h +++ b/packages/react-native/ReactCommon/react/renderer/core/RawPropsKey.h @@ -11,8 +11,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Represent a prop name stored as three `char const *` fragments. @@ -38,5 +37,4 @@ class RawPropsKey final { bool operator==(RawPropsKey const &lhs, RawPropsKey const &rhs) noexcept; bool operator!=(RawPropsKey const &lhs, RawPropsKey const &rhs) noexcept; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/RawPropsKeyMap.h b/packages/react-native/ReactCommon/react/renderer/core/RawPropsKeyMap.h index ad50c5529fd..78586d6f7e3 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/RawPropsKeyMap.h +++ b/packages/react-native/ReactCommon/react/renderer/core/RawPropsKeyMap.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * A map especially optimized to hold `{name: index}` relations. @@ -60,5 +59,4 @@ class RawPropsKeyMap final { buckets_{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.h b/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.h index 0ea961232b5..289b2601f14 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.h +++ b/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.h @@ -17,8 +17,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Specialized (to a particular type of Props) parser that provides the most @@ -91,5 +90,4 @@ class RawPropsParser final { mutable bool ready_{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/RawPropsPrimitives.h b/packages/react-native/ReactCommon/react/renderer/core/RawPropsPrimitives.h index 89855f84ee6..490991a1a03 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/RawPropsPrimitives.h +++ b/packages/react-native/ReactCommon/react/renderer/core/RawPropsPrimitives.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Type used to represent an index of some stored values in small arrays. @@ -51,5 +50,4 @@ constexpr static auto kNumberOfPropsPerComponentSoftCap = 150; */ constexpr static auto kPropNameLengthHardCap = 64; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/RawValue.h b/packages/react-native/ReactCommon/react/renderer/core/RawValue.h index c69f9e43cea..1107df54e05 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/RawValue.h +++ b/packages/react-native/ReactCommon/react/renderer/core/RawValue.h @@ -16,8 +16,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { class RawPropsParser; @@ -278,5 +277,4 @@ class RawValue { } }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/ReactEventPriority.h b/packages/react-native/ReactCommon/react/renderer/core/ReactEventPriority.h index b3c17f90ba3..741084fe67b 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ReactEventPriority.h +++ b/packages/react-native/ReactCommon/react/renderer/core/ReactEventPriority.h @@ -7,8 +7,7 @@ #pragma once -namespace facebook { -namespace react { +namespace facebook::react { /* * An enum that represents React's event priority. @@ -39,5 +38,4 @@ static constexpr std::underlying_type::type serialize( reactEventPriority); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/ReactPrimitives.h b/packages/react-native/ReactCommon/react/renderer/core/ReactPrimitives.h index 82381130649..d77ac597132 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ReactPrimitives.h +++ b/packages/react-native/ReactCommon/react/renderer/core/ReactPrimitives.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * `Tag` and `InstanceHandle` are used to address React Native components. @@ -74,5 +73,4 @@ enum class DisplayMode { Hidden = 2, }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/Sealable.h b/packages/react-native/ReactCommon/react/renderer/core/Sealable.h index d0a95dcf57e..b40cb4840af 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/Sealable.h +++ b/packages/react-native/ReactCommon/react/renderer/core/Sealable.h @@ -11,8 +11,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Represents an object which can be *sealed* (imperatively marked as @@ -91,5 +90,4 @@ class Sealable { #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.h b/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.h index fac0f4ecb78..0710143e9be 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.h @@ -21,8 +21,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { static constexpr const int kShadowNodeChildrenSmallVectorSize = 8; @@ -226,5 +225,4 @@ class ShadowNode : public Sealable, ShadowNodeTraits traits_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/ShadowNodeFamily.h b/packages/react-native/ReactCommon/react/renderer/core/ShadowNodeFamily.h index 54016e46f4d..32c7eb30332 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ShadowNodeFamily.h +++ b/packages/react-native/ReactCommon/react/renderer/core/ShadowNodeFamily.h @@ -16,8 +16,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ComponentDescriptor; class ShadowNode; @@ -151,5 +150,4 @@ class ShadowNodeFamily final { mutable bool hasParent_{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/ShadowNodeFamilyFragment.h b/packages/react-native/ReactCommon/react/renderer/core/ShadowNodeFamilyFragment.h index 2f7aa4b148d..0de0e60ebe3 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ShadowNodeFamilyFragment.h +++ b/packages/react-native/ReactCommon/react/renderer/core/ShadowNodeFamilyFragment.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ShadowNodeFamily; @@ -51,5 +50,4 @@ class ShadowNodeFamilyFragment final { }; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/ShadowNodeFragment.h b/packages/react-native/ReactCommon/react/renderer/core/ShadowNodeFragment.h index f1b95afa3fd..ec167629ca1 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ShadowNodeFragment.h +++ b/packages/react-native/ReactCommon/react/renderer/core/ShadowNodeFragment.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * An object which supposed to be used as a parameter specifying a shape @@ -62,5 +61,4 @@ struct ShadowNodeFragment { }; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/ShadowNodeTraits.h b/packages/react-native/ReactCommon/react/renderer/core/ShadowNodeTraits.h index 11ca76c88b3..9bb4d77a9cf 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ShadowNodeTraits.h +++ b/packages/react-native/ReactCommon/react/renderer/core/ShadowNodeTraits.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * A set of predefined traits associated with a particular `ShadowNode` class @@ -119,5 +118,4 @@ class ShadowNodeTraits { Trait traits_{Trait::None}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/State.h b/packages/react-native/ReactCommon/react/renderer/core/State.h index 6777bc5ca02..d29558d96ea 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/State.h +++ b/packages/react-native/ReactCommon/react/renderer/core/State.h @@ -15,8 +15,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * An abstract interface of State. @@ -110,5 +109,4 @@ class State { size_t revision_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/StateData.h b/packages/react-native/ReactCommon/react/renderer/core/StateData.h index 8f08b1bb6e6..dcdcaf05e3a 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/StateData.h +++ b/packages/react-native/ReactCommon/react/renderer/core/StateData.h @@ -15,8 +15,7 @@ #include #endif -namespace facebook { -namespace react { +namespace facebook::react { /* * Dummy type that is used as a placeholder for state data for nodes that @@ -33,5 +32,4 @@ struct StateData final { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/StatePipe.h b/packages/react-native/ReactCommon/react/renderer/core/StatePipe.h index ace25817209..da1d1e0244d 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/StatePipe.h +++ b/packages/react-native/ReactCommon/react/renderer/core/StatePipe.h @@ -11,10 +11,8 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { using StatePipe = std::function; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/StateUpdate.h b/packages/react-native/ReactCommon/react/renderer/core/StateUpdate.h index b275d06e4bb..85168e023b1 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/StateUpdate.h +++ b/packages/react-native/ReactCommon/react/renderer/core/StateUpdate.h @@ -11,8 +11,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { class ShadowNodeFamily; using SharedShadowNodeFamily = std::shared_ptr; @@ -27,5 +26,4 @@ class StateUpdate { Callback callback; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/UnbatchedEventQueue.h b/packages/react-native/ReactCommon/react/renderer/core/UnbatchedEventQueue.h index a3626babb6e..9b2f9fd8207 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/UnbatchedEventQueue.h +++ b/packages/react-native/ReactCommon/react/renderer/core/UnbatchedEventQueue.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Event Queue that dispatches events as granular as possible without waiting @@ -23,5 +22,4 @@ class UnbatchedEventQueue final : public EventQueue { void onEnqueue() const override; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/ValueFactory.h b/packages/react-native/ReactCommon/react/renderer/core/ValueFactory.h index 37adc1bea96..ddf262293e3 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ValueFactory.h +++ b/packages/react-native/ReactCommon/react/renderer/core/ValueFactory.h @@ -11,10 +11,8 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { using ValueFactory = std::function; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/conversions.h b/packages/react-native/ReactCommon/react/renderer/core/conversions.h index 726aaa81ff0..8723d5e23d1 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/conversions.h +++ b/packages/react-native/ReactCommon/react/renderer/core/conversions.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { inline std::string toString(const LayoutDirection &layoutDirection) { switch (layoutDirection) { @@ -70,5 +69,4 @@ inline Size yogaMeassureToSize(int64_t value) { return {*measuredWidth, *measuredHeight}; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/graphicsConversions.h b/packages/react-native/ReactCommon/react/renderer/core/graphicsConversions.h index e91cbd44dc4..1844f67fdb7 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/graphicsConversions.h +++ b/packages/react-native/ReactCommon/react/renderer/core/graphicsConversions.h @@ -20,8 +20,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { #pragma mark - Color @@ -256,5 +255,4 @@ inline std::string toString(const CornerInsets &cornerInsets) { folly::to(cornerInsets.bottomRight) + "}"; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/core/propsConversions.h b/packages/react-native/ReactCommon/react/renderer/core/propsConversions.h index 02d92832218..090f1435a31 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/propsConversions.h +++ b/packages/react-native/ReactCommon/react/renderer/core/propsConversions.h @@ -16,8 +16,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /** * Use this only when a prop update has definitely been sent from JS; @@ -142,5 +141,4 @@ T convertRawProp( } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/debug/DebugStringConvertible.h b/packages/react-native/ReactCommon/react/renderer/debug/DebugStringConvertible.h index 7df17f01e39..ca33c68f65f 100644 --- a/packages/react-native/ReactCommon/react/renderer/debug/DebugStringConvertible.h +++ b/packages/react-native/ReactCommon/react/renderer/debug/DebugStringConvertible.h @@ -16,8 +16,7 @@ #include "flags.h" -namespace facebook { -namespace react { +namespace facebook::react { #if RN_DEBUG_STRING_CONVERTIBLE @@ -384,5 +383,4 @@ inline std::string getDebugValue(DebugStringConvertibleObject const &object) { #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/debug/DebugStringConvertibleItem.h b/packages/react-native/ReactCommon/react/renderer/debug/DebugStringConvertibleItem.h index 6f01c8b7e13..dd9e7903959 100644 --- a/packages/react-native/ReactCommon/react/renderer/debug/DebugStringConvertibleItem.h +++ b/packages/react-native/ReactCommon/react/renderer/debug/DebugStringConvertibleItem.h @@ -11,8 +11,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { #if RN_DEBUG_STRING_CONVERTIBLE @@ -43,5 +42,4 @@ class DebugStringConvertibleItem : public DebugStringConvertible { #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/debug/SystraceSection.h b/packages/react-native/ReactCommon/react/renderer/debug/SystraceSection.h index 46996ff2bb7..f1579db8fc4 100644 --- a/packages/react-native/ReactCommon/react/renderer/debug/SystraceSection.h +++ b/packages/react-native/ReactCommon/react/renderer/debug/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/react/renderer/debug/debugStringConvertibleUtils.h b/packages/react-native/ReactCommon/react/renderer/debug/debugStringConvertibleUtils.h index 6fde6333157..1101aeeb45d 100644 --- a/packages/react-native/ReactCommon/react/renderer/debug/debugStringConvertibleUtils.h +++ b/packages/react-native/ReactCommon/react/renderer/debug/debugStringConvertibleUtils.h @@ -16,8 +16,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { #if RN_DEBUG_STRING_CONVERTIBLE @@ -63,5 +62,4 @@ inline SharedDebugStringConvertible debugStringConvertibleItem( #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/element/ComponentBuilder.h b/packages/react-native/ReactCommon/react/renderer/element/ComponentBuilder.h index 458323c309c..6a0251fab9f 100644 --- a/packages/react-native/ReactCommon/react/renderer/element/ComponentBuilder.h +++ b/packages/react-native/ReactCommon/react/renderer/element/ComponentBuilder.h @@ -18,8 +18,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Build `ShadowNode` trees with a given given `Element` trees. @@ -55,5 +54,4 @@ class ComponentBuilder final { ComponentDescriptorRegistry::Shared componentDescriptorRegistry_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/element/Element.h b/packages/react-native/ReactCommon/react/renderer/element/Element.h index 67233ae3380..57cd4119d78 100644 --- a/packages/react-native/ReactCommon/react/renderer/element/Element.h +++ b/packages/react-native/ReactCommon/react/renderer/element/Element.h @@ -14,8 +14,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * `Element<>` is an abstraction layer that allows describing component @@ -154,5 +153,4 @@ class Element final { ElementFragment fragment_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/element/ElementFragment.h b/packages/react-native/ReactCommon/react/renderer/element/ElementFragment.h index 6a14ed15480..5e9dfbc1322 100644 --- a/packages/react-native/ReactCommon/react/renderer/element/ElementFragment.h +++ b/packages/react-native/ReactCommon/react/renderer/element/ElementFragment.h @@ -13,8 +13,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * This is an implementation detail, do not use it directly. @@ -58,5 +57,4 @@ class ElementFragment final { StateCallback stateCallback; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/element/testUtils.h b/packages/react-native/ReactCommon/react/renderer/element/testUtils.h index 2d6a07141a6..902f8bc4366 100644 --- a/packages/react-native/ReactCommon/react/renderer/element/testUtils.h +++ b/packages/react-native/ReactCommon/react/renderer/element/testUtils.h @@ -17,8 +17,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { inline ComponentBuilder simpleComponentBuilder() { ComponentDescriptorProviderRegistry componentDescriptorProviderRegistry{}; @@ -45,5 +44,4 @@ inline ComponentBuilder simpleComponentBuilder() { return ComponentBuilder{componentDescriptorRegistry}; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/ColorComponents.h b/packages/react-native/ReactCommon/react/renderer/graphics/ColorComponents.h index 870a8c33ce7..0a3887a3cae 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/ColorComponents.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/ColorComponents.h @@ -7,8 +7,7 @@ #pragma once -namespace facebook { -namespace react { +namespace facebook::react { struct ColorComponents { float red{0}; @@ -17,5 +16,4 @@ struct ColorComponents { float alpha{0}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/Point.h b/packages/react-native/ReactCommon/react/renderer/graphics/Point.h index fe05894862f..4e456854da1 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/Point.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/Point.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Contains a point in a two-dimensional coordinate system. @@ -57,8 +56,7 @@ inline bool operator!=(Point const &rhs, Point const &lhs) noexcept { return !(lhs == rhs); } -} // namespace react -} // namespace facebook +} // namespace facebook::react namespace std { diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/Rect.h b/packages/react-native/ReactCommon/react/renderer/graphics/Rect.h index 8cb12dda0d0..6c549ac02db 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/Rect.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/Rect.h @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Contains the location and dimensions of a rectangle. @@ -101,8 +100,7 @@ struct Rect { } }; -} // namespace react -} // namespace facebook +} // namespace facebook::react namespace std { diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/RectangleCorners.h b/packages/react-native/ReactCommon/react/renderer/graphics/RectangleCorners.h index 438ee96a77d..56c5fa428a4 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/RectangleCorners.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/RectangleCorners.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Generic data structure describes some values associated with *corners* @@ -50,8 +49,7 @@ struct RectangleCorners { */ using CornerInsets = RectangleCorners; -} // namespace react -} // namespace facebook +} // namespace facebook::react namespace std { diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/RectangleEdges.h b/packages/react-native/ReactCommon/react/renderer/graphics/RectangleEdges.h index 4452475ff5a..77c2874868a 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/RectangleEdges.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/RectangleEdges.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Generic data structure describes some values associated with *edges* @@ -93,8 +92,7 @@ inline Rect outsetBy(Rect const &rect, EdgeInsets const &outsets) noexcept { rect.size.height + outsets.top + outsets.bottom}}; } -} // namespace react -} // namespace facebook +} // namespace facebook::react namespace std { diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/Size.h b/packages/react-native/ReactCommon/react/renderer/graphics/Size.h index c5e3e8a44bb..329ca6fc234 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/Size.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/Size.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Contains width and height values. @@ -44,8 +43,7 @@ inline bool operator!=(Size const &rhs, Size const &lhs) noexcept { return !(lhs == rhs); } -} // namespace react -} // namespace facebook +} // namespace facebook::react namespace std { diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/Transform.h b/packages/react-native/ReactCommon/react/renderer/graphics/Transform.h index 97bd076f885..c8c849c6677 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/Transform.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/Transform.h @@ -21,8 +21,7 @@ #include #endif -namespace facebook { -namespace react { +namespace facebook::react { inline bool isZero(Float n) { // We use this ternary expression instead of abs, fabsf, etc, because @@ -206,8 +205,7 @@ EdgeInsets operator*(EdgeInsets const &edgeInsets, Transform const &transform); Vector operator*(Transform const &transform, Vector const &vector); -} // namespace react -} // namespace facebook +} // namespace facebook::react namespace std { diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/Vector.h b/packages/react-native/ReactCommon/react/renderer/graphics/Vector.h index f8b8f7b94be..595856d59e8 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/Vector.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/Vector.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { struct Vector { Float x{0}; @@ -19,5 +18,4 @@ struct Vector { Float w{0}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/platform/android/react/renderer/graphics/Float.h b/packages/react-native/ReactCommon/react/renderer/graphics/platform/android/react/renderer/graphics/Float.h index ef2c55c93ff..ee0ee3e6a37 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/platform/android/react/renderer/graphics/Float.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/platform/android/react/renderer/graphics/Float.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Exact type of float numbers which ideally should match a type behing @@ -18,5 +17,4 @@ namespace react { */ using Float = float; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/platform/android/react/renderer/graphics/PlatformColorParser.h b/packages/react-native/ReactCommon/react/renderer/graphics/platform/android/react/renderer/graphics/PlatformColorParser.h index d2b485ec843..b61e0ff3886 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/platform/android/react/renderer/graphics/PlatformColorParser.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/platform/android/react/renderer/graphics/PlatformColorParser.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { inline ColorComponents parsePlatformColor( const PropsParserContext &context, @@ -50,5 +49,4 @@ inline ColorComponents parsePlatformColor( return colorComponents; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/Float.h b/packages/react-native/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/Float.h index ef2c55c93ff..ee0ee3e6a37 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/Float.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/Float.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Exact type of float numbers which ideally should match a type behing @@ -18,5 +17,4 @@ namespace react { */ using Float = float; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/PlatformColorParser.h b/packages/react-native/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/PlatformColorParser.h index 83809d751b0..ffcc3dbfae1 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/PlatformColorParser.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/PlatformColorParser.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { inline ColorComponents parsePlatformColor( const PropsParserContext &context, @@ -25,5 +24,4 @@ inline ColorComponents parsePlatformColor( return {red, green, blue, alpha}; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/Float.h b/packages/react-native/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/Float.h index 4bee49ced99..ef09235874e 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/Float.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/Float.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Exact type of float numbers which ideally should match a type behing @@ -19,5 +18,4 @@ namespace react { */ using Float = CGFloat; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/PlatformColorParser.h b/packages/react-native/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/PlatformColorParser.h index 28922fff67b..15c8a5221d6 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/PlatformColorParser.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/PlatformColorParser.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { inline ColorComponents parsePlatformColor( const PropsParserContext &context, @@ -30,5 +29,4 @@ inline ColorComponents parsePlatformColor( return {0, 0, 0, 0}; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/rounding.h b/packages/react-native/ReactCommon/react/renderer/graphics/rounding.h index bbdc7d33e16..09c05339c59 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/rounding.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/rounding.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Convenience functions for rounding float values to be aligned with a device @@ -81,5 +80,4 @@ inline long double floor(long double value) noexcept { return ::floorl(value); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageManager.h b/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageManager.h index 42117ac7f77..4762b4175ff 100644 --- a/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageManager.h +++ b/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageManager.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ImageManager; @@ -36,5 +35,4 @@ class ImageManager { void *self_{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageRequest.h b/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageRequest.h index 8cad25f16e2..eaf4b1f6bf3 100644 --- a/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageRequest.h +++ b/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageRequest.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Represents ongoing request for an image resource. @@ -96,5 +95,4 @@ class ImageRequest final { std::function cancelRequest_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponse.h b/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponse.h index 41a32e0251c..8d965784901 100644 --- a/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponse.h +++ b/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponse.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Represents retrieved image bitmap and any associated platform-specific info. @@ -35,5 +34,4 @@ class ImageResponse final { std::shared_ptr metadata_{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponseObserver.h b/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponseObserver.h index 5e3bca02cec..0a0456054bb 100644 --- a/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponseObserver.h +++ b/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponseObserver.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Represents any observer of ImageResponse progression, completion, or failure. @@ -25,5 +24,4 @@ class ImageResponseObserver { virtual void didReceiveFailure() const = 0; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponseObserverCoordinator.h b/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponseObserverCoordinator.h index 696d90569aa..67779c3fad9 100644 --- a/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponseObserverCoordinator.h +++ b/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageResponseObserverCoordinator.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * The ImageResponseObserverCoordinator receives events and completed image @@ -85,5 +84,4 @@ class ImageResponseObserverCoordinator { mutable std::mutex mutex_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageTelemetry.h b/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageTelemetry.h index 2169590dbaa..6091933af7f 100644 --- a/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageTelemetry.h +++ b/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageTelemetry.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Represents telemetry data associated with a image request @@ -33,5 +32,4 @@ class ImageTelemetry final { const SurfaceId surfaceId_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/ImageManager.mm b/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/ImageManager.mm index 637f0d942d0..1b0b67095ba 100644 --- a/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/ImageManager.mm +++ b/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/ImageManager.mm @@ -14,8 +14,7 @@ #import "RCTImageManager.h" #import "RCTSyncImageManager.h" -namespace facebook { -namespace react { +namespace facebook::react { ImageManager::ImageManager(ContextContainer::Shared const &contextContainer) { @@ -41,5 +40,4 @@ ImageRequest ImageManager::requestImage(const ImageSource &imageSource, SurfaceI return [imageManager requestImage:imageSource surfaceId:surfaceId]; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/ImageRequest.cpp b/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/ImageRequest.cpp index 3961d8d6d7f..e073cc6dfff 100644 --- a/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/ImageRequest.cpp +++ b/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/ImageRequest.cpp @@ -7,8 +7,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { ImageRequest::ImageRequest( ImageSource imageSource, @@ -57,5 +56,4 @@ const std::shared_ptr return coordinator_; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/imagemanager/primitives.h b/packages/react-native/ReactCommon/react/renderer/imagemanager/primitives.h index a818b62b531..b3014de5442 100644 --- a/packages/react-native/ReactCommon/react/renderer/imagemanager/primitives.h +++ b/packages/react-native/ReactCommon/react/renderer/imagemanager/primitives.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class ImageSource { public: @@ -45,5 +44,4 @@ enum class ImageResizeMode { Repeat, }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/leakchecker/LeakChecker.h b/packages/react-native/ReactCommon/react/renderer/leakchecker/LeakChecker.h index c568b190fdd..28e5730c912 100644 --- a/packages/react-native/ReactCommon/react/renderer/leakchecker/LeakChecker.h +++ b/packages/react-native/ReactCommon/react/renderer/leakchecker/LeakChecker.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { using GarbageCollectionTrigger = std::function; @@ -35,5 +34,4 @@ class LeakChecker final { SurfaceId previouslyStoppedSurface_{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/leakchecker/WeakFamilyRegistry.h b/packages/react-native/ReactCommon/react/renderer/leakchecker/WeakFamilyRegistry.h index d8b0e8b777f..f3a350da684 100644 --- a/packages/react-native/ReactCommon/react/renderer/leakchecker/WeakFamilyRegistry.h +++ b/packages/react-native/ReactCommon/react/renderer/leakchecker/WeakFamilyRegistry.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class WeakFamilyRegistry final { public: @@ -35,5 +34,4 @@ class WeakFamilyRegistry final { mutable std::unordered_map families_{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mapbuffer/MapBuffer.h b/packages/react-native/ReactCommon/react/renderer/mapbuffer/MapBuffer.h index a6af6c86526..0e6ffb4cffe 100644 --- a/packages/react-native/ReactCommon/react/renderer/mapbuffer/MapBuffer.h +++ b/packages/react-native/ReactCommon/react/renderer/mapbuffer/MapBuffer.h @@ -17,8 +17,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class JReadableMapBuffer; @@ -151,5 +150,4 @@ class MapBuffer { friend JReadableMapBuffer; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.h b/packages/react-native/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.h index 8f54bfd1254..5e45d6e1a2a 100644 --- a/packages/react-native/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.h +++ b/packages/react-native/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { // Default reserved size for buckets_ vector constexpr uint32_t INITIAL_BUCKETS_SIZE = 10; @@ -60,5 +59,4 @@ class MapBufferBuilder { uint32_t valueSize); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.h b/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.h index 6d7cbfa58d3..8da7150231b 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { enum class ReparentMode { Flatten, Unflatten }; @@ -67,5 +66,4 @@ ShadowViewNodePair::NonOwningList sliceChildShadowNodeViewPairsV2( ShadowViewNodePair::OwningList sliceChildShadowNodeViewPairsLegacy( ShadowNode const &shadowNode); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/MountingCoordinator.h b/packages/react-native/ReactCommon/react/renderer/mounting/MountingCoordinator.h index 188c6fb02b7..a3523065d7d 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/MountingCoordinator.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/MountingCoordinator.h @@ -22,8 +22,7 @@ #include #endif -namespace facebook { -namespace react { +namespace facebook::react { /* * Stores inside all non-mounted yet revisions of a shadow tree and coordinates @@ -117,5 +116,4 @@ class MountingCoordinator final { #endif }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h b/packages/react-native/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h index 807cd9f0130..2e9c34a2749 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h @@ -9,8 +9,7 @@ #pragma once -namespace facebook { -namespace react { +namespace facebook::react { class MountingCoordinator; @@ -43,5 +42,4 @@ class MountingOverrideDelegate { ShadowViewMutationList mutations) const = 0; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.h b/packages/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.h index 6a65d8dab9f..34a094cd9af 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Encapsulates all artifacts of `ShadowTree` commit (or a series of them), @@ -84,5 +83,4 @@ class MountingTransaction final { mutable TransactionTelemetry telemetry_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.h b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.h index ec88f9e00d3..6358f2e80b7 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.h @@ -20,8 +20,7 @@ #include #include "MountingOverrideDelegate.h" -namespace facebook { -namespace react { +namespace facebook::react { using ShadowTreeCommitTransaction = std::function; @@ -148,5 +147,4 @@ class ShadowTree final { MountingCoordinator::Shared mountingCoordinator_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeDelegate.h b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeDelegate.h index e363eda8bd8..22c49ad74d3 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeDelegate.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeDelegate.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { class ShadowTree; @@ -40,5 +39,4 @@ class ShadowTreeDelegate { virtual ~ShadowTreeDelegate() noexcept = default; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeRegistry.h b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeRegistry.h index 60e4295568f..a74b929975f 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeRegistry.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeRegistry.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Owning registry of `ShadowTree`s. @@ -68,5 +67,4 @@ class ShadowTreeRegistry final { registry_; // Protected by `mutex_`. }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeRevision.h b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeRevision.h index 4c7075ec7a5..74f4678cf86 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeRevision.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeRevision.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Represent a particular committed state of a shadow tree. The object contains @@ -36,5 +35,4 @@ class ShadowTreeRevision final { TransactionTelemetry telemetry; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowView.h b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowView.h index 350f05bd77d..b963d81e61c 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowView.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowView.h @@ -16,8 +16,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Describes a view that can be mounted. @@ -123,8 +122,7 @@ struct ShadowViewNodePairLegacy final { bool operator!=(const ShadowViewNodePairLegacy &rhs) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react namespace std { diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowViewMutation.h b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowViewMutation.h index cc76e261d64..07467d57195 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowViewMutation.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowViewMutation.h @@ -11,8 +11,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Describes a single native view tree mutation which may contain @@ -132,5 +131,4 @@ std::vector getDebugProps( #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/StubView.h b/packages/react-native/ReactCommon/react/renderer/mounting/StubView.h index b629a16abd0..472e6c0d100 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/StubView.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/StubView.h @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { static const int NO_VIEW_TAG = -1; @@ -59,5 +58,4 @@ std::vector getDebugChildren( #endif -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/StubViewTree.h b/packages/react-native/ReactCommon/react/renderer/mounting/StubViewTree.h index 5d09bed0a0f..69eff224a19 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/StubViewTree.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/StubViewTree.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class StubViewTree { public: @@ -46,5 +45,4 @@ class StubViewTree { bool operator==(StubViewTree const &lhs, StubViewTree const &rhs); bool operator!=(StubViewTree const &lhs, StubViewTree const &rhs); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/TelemetryController.h b/packages/react-native/ReactCommon/react/renderer/mounting/TelemetryController.h index 23ecd25c806..6762c3081c5 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/TelemetryController.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/TelemetryController.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class MountingCoordinator; @@ -56,5 +55,4 @@ class TelemetryController final { mutable std::mutex mutex_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/stubs.h b/packages/react-native/ReactCommon/react/renderer/mounting/stubs.h index a55145be1e6..54d59faed15 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/stubs.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/stubs.h @@ -11,8 +11,7 @@ #include "StubView.h" #include "StubViewTree.h" -namespace facebook { -namespace react { +namespace facebook::react { /* * Builds a ShadowView tree from given root ShadowNode using custom built-in @@ -28,5 +27,4 @@ StubViewTree buildStubViewTreeWithoutUsingDifferentiator( StubViewTree buildStubViewTreeUsingDifferentiator( ShadowNode const &rootShadowNode); -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/ErrorUtils.h b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/ErrorUtils.h index 75e7f0a6ba7..ee289f508ef 100644 --- a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/ErrorUtils.h +++ b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/ErrorUtils.h @@ -7,8 +7,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { inline static void handleFatalError( jsi::Runtime &runtime, @@ -32,5 +31,4 @@ inline static void handleFatalError( func.call(runtime, error.value()); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h index daaf8b8a561..a056e1ada66 100644 --- a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +++ b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class RuntimeScheduler final { public: @@ -152,5 +151,4 @@ class RuntimeScheduler final { mutable std::atomic_bool isPerformingWork_{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.h b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.h index 92c345abbfc..95925b97785 100644 --- a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.h +++ b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Exposes RuntimeScheduler to JavaScript realm. @@ -48,5 +47,4 @@ class RuntimeSchedulerBinding : public jsi::HostObject { std::shared_ptr runtimeScheduler_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h index 58781ca212d..93cc925f685 100644 --- a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h +++ b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Exposes RuntimeScheduler to native modules. All calls invoked on JavaScript @@ -33,5 +32,4 @@ class RuntimeSchedulerCallInvoker : public CallInvoker { std::weak_ptr runtimeScheduler_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerClock.h b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerClock.h index c6edc7f28c9..ca7dfdd020c 100644 --- a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerClock.h +++ b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerClock.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Represents a monotonic clock suitable for measuring intervals. @@ -20,5 +19,4 @@ using RuntimeSchedulerClock = std::chrono::steady_clock; using RuntimeSchedulerTimePoint = RuntimeSchedulerClock::time_point; using RuntimeSchedulerDuration = RuntimeSchedulerClock::duration; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/primitives.h b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/primitives.h index 4253d490ca0..056031be527 100644 --- a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/primitives.h +++ b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/primitives.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { struct TaskWrapper : public jsi::HostObject { TaskWrapper(std::shared_ptr const &task) : task(task) {} @@ -48,5 +47,4 @@ inline static std::shared_ptr taskFromValue( } } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/StubErrorUtils.h b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/StubErrorUtils.h index f5ddf9bbd30..7e77114d2dd 100644 --- a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/StubErrorUtils.h +++ b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/StubErrorUtils.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Exposes StubErrorUtils to JavaScript realm. @@ -68,5 +67,4 @@ class StubErrorUtils : public jsi::HostObject { int reportFatalCallCount_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/scheduler/InspectorData.h b/packages/react-native/ReactCommon/react/renderer/scheduler/InspectorData.h index 76eda88ac7e..1a0b1523adf 100644 --- a/packages/react-native/ReactCommon/react/renderer/scheduler/InspectorData.h +++ b/packages/react-native/ReactCommon/react/renderer/scheduler/InspectorData.h @@ -7,8 +7,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { struct InspectorData { std::vector hierarchy; @@ -20,5 +19,4 @@ struct InspectorData { folly::dynamic props; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/scheduler/Scheduler.h b/packages/react-native/ReactCommon/react/renderer/scheduler/Scheduler.h index f47c2217d4a..6decb8e95df 100644 --- a/packages/react-native/ReactCommon/react/renderer/scheduler/Scheduler.h +++ b/packages/react-native/ReactCommon/react/renderer/scheduler/Scheduler.h @@ -28,8 +28,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Scheduler coordinates Shadow Tree updates and event flows. @@ -147,5 +146,4 @@ class Scheduler final : public UIManagerDelegate { bool reduceDeleteCreateMutationLayoutAnimation_{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/scheduler/SchedulerToolbox.h b/packages/react-native/ReactCommon/react/renderer/scheduler/SchedulerToolbox.h index 0e3b677720c..0984cebd065 100644 --- a/packages/react-native/ReactCommon/react/renderer/scheduler/SchedulerToolbox.h +++ b/packages/react-native/ReactCommon/react/renderer/scheduler/SchedulerToolbox.h @@ -19,8 +19,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Contains all external dependencies of Scheduler. @@ -79,5 +78,4 @@ struct SchedulerToolbox final { std::vector> commitHooks; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/scheduler/SurfaceHandler.h b/packages/react-native/ReactCommon/react/renderer/scheduler/SurfaceHandler.h index 7b70ecf85c9..38a4aad8b12 100644 --- a/packages/react-native/ReactCommon/react/renderer/scheduler/SurfaceHandler.h +++ b/packages/react-native/ReactCommon/react/renderer/scheduler/SurfaceHandler.h @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class Scheduler; class ShadowTree; @@ -206,5 +205,4 @@ class SurfaceHandler { mutable Parameters parameters_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/scheduler/SurfaceManager.h b/packages/react-native/ReactCommon/react/renderer/scheduler/SurfaceManager.h index 15a68eb81c1..68aeb911d57 100644 --- a/packages/react-native/ReactCommon/react/renderer/scheduler/SurfaceManager.h +++ b/packages/react-native/ReactCommon/react/renderer/scheduler/SurfaceManager.h @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * `SurfaceManager` allows controlling React Native Surfaces via @@ -64,5 +63,4 @@ class SurfaceManager final { mutable butter::map registry_{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/scheduler/SynchronousEventBeat.h b/packages/react-native/ReactCommon/react/renderer/scheduler/SynchronousEventBeat.h index ff2827897b5..905b0dbcc4a 100644 --- a/packages/react-native/ReactCommon/react/renderer/scheduler/SynchronousEventBeat.h +++ b/packages/react-native/ReactCommon/react/renderer/scheduler/SynchronousEventBeat.h @@ -12,8 +12,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Event beat associated with main run loop. @@ -43,5 +42,4 @@ class SynchronousEventBeat final : public EventBeat, std::shared_ptr runtimeScheduler_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/telemetry/SurfaceTelemetry.h b/packages/react-native/ReactCommon/react/renderer/telemetry/SurfaceTelemetry.h index 32aa356be9f..bfe6ba264c0 100644 --- a/packages/react-native/ReactCommon/react/renderer/telemetry/SurfaceTelemetry.h +++ b/packages/react-native/ReactCommon/react/renderer/telemetry/SurfaceTelemetry.h @@ -13,8 +13,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Represents telemetry data associated with a particular running Surface. @@ -65,5 +64,4 @@ class SurfaceTelemetry final { recentTransactionTelemetries_{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/telemetry/TransactionTelemetry.h b/packages/react-native/ReactCommon/react/renderer/telemetry/TransactionTelemetry.h index 919e1f26b71..4d3c7947170 100644 --- a/packages/react-native/ReactCommon/react/renderer/telemetry/TransactionTelemetry.h +++ b/packages/react-native/ReactCommon/react/renderer/telemetry/TransactionTelemetry.h @@ -13,8 +13,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Represents telemetry data associated with a particular revision of @@ -83,5 +82,4 @@ class TransactionTelemetry final { std::function now_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/templateprocessor/UITemplateProcessor.h b/packages/react-native/ReactCommon/react/renderer/templateprocessor/UITemplateProcessor.h index 81416defac2..d9b779910d3 100644 --- a/packages/react-native/ReactCommon/react/renderer/templateprocessor/UITemplateProcessor.h +++ b/packages/react-native/ReactCommon/react/renderer/templateprocessor/UITemplateProcessor.h @@ -16,8 +16,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { // Temporary NativeModuleRegistry definition using NativeModuleCallFn = @@ -62,5 +61,4 @@ class UITemplateProcessor { const NativeModuleRegistry &nativeModuleRegistry, std::shared_ptr const &reactNativeConfig); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h index 6eb4cdcf1bf..f4dded74a0f 100644 --- a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h +++ b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { struct LineMeasurement { std::string text; @@ -203,8 +202,7 @@ inline bool operator!=( return !(lhs == rhs); } -} // namespace react -} // namespace facebook +} // namespace facebook::react namespace std { diff --git a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.h b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.h index 0f5e070b942..8f6ddb6ea14 100644 --- a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.h +++ b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.h @@ -14,8 +14,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class TextLayoutManager; @@ -99,5 +98,4 @@ class TextLayoutManager { TextMeasureCache measureCache_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.cpp b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.cpp index 1284f3edfdd..8667dfb9940 100644 --- a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.cpp +++ b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.cpp @@ -7,8 +7,7 @@ #include "TextLayoutManager.h" -namespace facebook { -namespace react { +namespace facebook::react { void *TextLayoutManager::getNativeTextLayoutManager() const { return (void *)this; @@ -43,5 +42,4 @@ std::shared_ptr TextLayoutManager::getHostTextStorage( return nullptr; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.h b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.h index cb2b9ebcf0a..b9ce01f5b16 100644 --- a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.h +++ b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.h @@ -16,8 +16,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class TextLayoutManager; @@ -60,5 +59,4 @@ class TextLayoutManager { LayoutConstraints layoutConstraints) const; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/TextLayoutManager.h b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/TextLayoutManager.h index 095fae58850..09769742e71 100644 --- a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/TextLayoutManager.h +++ b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/TextLayoutManager.h @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class TextLayoutManager; @@ -61,5 +60,4 @@ class TextLayoutManager { TextMeasureCache measureCache_{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/TextLayoutManager.mm b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/TextLayoutManager.mm index 4f2e8719565..c632441a429 100644 --- a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/TextLayoutManager.mm +++ b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/TextLayoutManager.mm @@ -11,8 +11,7 @@ #import "RCTTextLayoutManager.h" -namespace facebook { -namespace react { +namespace facebook::react { TextLayoutManager::TextLayoutManager(ContextContainer::Shared const &contextContainer) { @@ -116,5 +115,4 @@ LinesMeasurements TextLayoutManager::measureLines( size:{size.width, size.height}]; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/timeline/Timeline.h b/packages/react-native/ReactCommon/react/renderer/timeline/Timeline.h index 48376b27567..c2800c28104 100644 --- a/packages/react-native/ReactCommon/react/renderer/timeline/Timeline.h +++ b/packages/react-native/ReactCommon/react/renderer/timeline/Timeline.h @@ -15,8 +15,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class UIManager; @@ -58,5 +57,4 @@ class Timeline final { mutable bool rewinding_{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/timeline/TimelineController.h b/packages/react-native/ReactCommon/react/renderer/timeline/TimelineController.h index a50920f86d8..f328677e05d 100644 --- a/packages/react-native/ReactCommon/react/renderer/timeline/TimelineController.h +++ b/packages/react-native/ReactCommon/react/renderer/timeline/TimelineController.h @@ -16,8 +16,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Provides tools for introspecting the series of commits and associated @@ -76,5 +75,4 @@ class TimelineController final : public UIManagerCommitHook { mutable SurfaceId lastUpdatedSurface_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/timeline/TimelineFrame.h b/packages/react-native/ReactCommon/react/renderer/timeline/TimelineFrame.h index 0dfb2ed9e71..c732948356c 100644 --- a/packages/react-native/ReactCommon/react/renderer/timeline/TimelineFrame.h +++ b/packages/react-native/ReactCommon/react/renderer/timeline/TimelineFrame.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Represents a reference to a commit from the past. @@ -42,5 +41,4 @@ class TimelineFrame final { TelemetryTimePoint timePoint_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/timeline/TimelineHandler.h b/packages/react-native/ReactCommon/react/renderer/timeline/TimelineHandler.h index 3615d76eba7..2be8f825801 100644 --- a/packages/react-native/ReactCommon/react/renderer/timeline/TimelineHandler.h +++ b/packages/react-native/ReactCommon/react/renderer/timeline/TimelineHandler.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { class Timeline; @@ -76,5 +75,4 @@ class TimelineHandler final { Timeline const *timeline_{}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/timeline/TimelineSnapshot.h b/packages/react-native/ReactCommon/react/renderer/timeline/TimelineSnapshot.h index 0b293f32136..cbada734a83 100644 --- a/packages/react-native/ReactCommon/react/renderer/timeline/TimelineSnapshot.h +++ b/packages/react-native/ReactCommon/react/renderer/timeline/TimelineSnapshot.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Represents a reference to a commit from the past used by `Timeline`. @@ -30,5 +29,4 @@ class TimelineSnapshot final { TimelineFrame frame_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/test_utils/Entropy.h b/packages/react-native/ReactCommon/react/test_utils/Entropy.h index e9fb4eb66a5..216fa5551cf 100644 --- a/packages/react-native/ReactCommon/react/test_utils/Entropy.h +++ b/packages/react-native/ReactCommon/react/test_utils/Entropy.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * The source of pseudo-random numbers and some problem-oriented tools built on @@ -131,5 +130,4 @@ class Entropy final { uint_fast32_t seed_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/test_utils/MockSurfaceHandler.h b/packages/react-native/ReactCommon/react/test_utils/MockSurfaceHandler.h index 3563c699109..61e977467ba 100644 --- a/packages/react-native/ReactCommon/react/test_utils/MockSurfaceHandler.h +++ b/packages/react-native/ReactCommon/react/test_utils/MockSurfaceHandler.h @@ -11,8 +11,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { class MockSurfaceHandler : public SurfaceHandler { public: @@ -22,5 +21,4 @@ class MockSurfaceHandler : public SurfaceHandler { MOCK_METHOD(SurfaceId, getSurfaceId, (), (const, noexcept)); }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/test_utils/shadowTreeGeneration.h b/packages/react-native/ReactCommon/react/test_utils/shadowTreeGeneration.h index db8581e1f8b..79ac907c909 100644 --- a/packages/react-native/ReactCommon/react/test_utils/shadowTreeGeneration.h +++ b/packages/react-native/ReactCommon/react/test_utils/shadowTreeGeneration.h @@ -23,8 +23,7 @@ #include "Entropy.h" -namespace facebook { -namespace react { +namespace facebook::react { static Tag generateReactTag() { static Tag tag = 1000; @@ -311,5 +310,4 @@ static inline ShadowNode::Shared generateShadowNodeTree( family); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/utils/CalledOnceMovableOnlyFunction.h b/packages/react-native/ReactCommon/react/utils/CalledOnceMovableOnlyFunction.h index 09aa8812ffc..d9f28c33041 100644 --- a/packages/react-native/ReactCommon/react/utils/CalledOnceMovableOnlyFunction.h +++ b/packages/react-native/ReactCommon/react/utils/CalledOnceMovableOnlyFunction.h @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Implements a moveable-only function that asserts if called more than once @@ -85,5 +84,4 @@ class CalledOnceMovableOnlyFunction { } }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/utils/ContextContainer.h b/packages/react-native/ReactCommon/react/utils/ContextContainer.h index dd3f8391554..f71fb759493 100644 --- a/packages/react-native/ReactCommon/react/utils/ContextContainer.h +++ b/packages/react-native/ReactCommon/react/utils/ContextContainer.h @@ -18,8 +18,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * General purpose dependency injection container. @@ -109,5 +108,4 @@ class ContextContainer final { mutable butter::map> instances_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/utils/FloatComparison.h b/packages/react-native/ReactCommon/react/utils/FloatComparison.h index aa198b442a5..d760cef1cdf 100644 --- a/packages/react-native/ReactCommon/react/utils/FloatComparison.h +++ b/packages/react-native/ReactCommon/react/utils/FloatComparison.h @@ -7,13 +7,11 @@ #pragma once -namespace facebook { -namespace react { +namespace facebook::react { inline bool floatEquality(float a, float b, float epsilon = 0.005f) { return (std::isnan(a) && std::isnan(b)) || (!std::isnan(a) && !std::isnan(b) && fabs(a - b) < epsilon); } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/utils/ManagedObjectWrapper.h b/packages/react-native/ReactCommon/react/utils/ManagedObjectWrapper.h index 3af8b158eb6..6b285ec09b9 100644 --- a/packages/react-native/ReactCommon/react/utils/ManagedObjectWrapper.h +++ b/packages/react-native/ReactCommon/react/utils/ManagedObjectWrapper.h @@ -24,8 +24,7 @@ @property (nonatomic, weak) id object; @end -namespace facebook { -namespace react { +namespace facebook::react { namespace detail { @@ -75,8 +74,7 @@ inline id unwrapManagedObjectWeakly(std::shared_ptr const &object) noexcep return weakWrapper.object; } -} // namespace react -} // namespace facebook +} // namespace facebook::react #endif #endif diff --git a/packages/react-native/ReactCommon/react/utils/ManagedObjectWrapper.mm b/packages/react-native/ReactCommon/react/utils/ManagedObjectWrapper.mm index 44e4241f484..2e4372e42da 100644 --- a/packages/react-native/ReactCommon/react/utils/ManagedObjectWrapper.mm +++ b/packages/react-native/ReactCommon/react/utils/ManagedObjectWrapper.mm @@ -9,8 +9,7 @@ #if TARGET_OS_MAC -namespace facebook { -namespace react { +namespace facebook::react { namespace detail { void wrappedManagedObjectDeleter(void *cfPointer) noexcept @@ -27,8 +26,7 @@ void wrappedManagedObjectDeleter(void *cfPointer) noexcept } } // namespace detail -} // namespace react -} // namespace facebook +} // namespace facebook::react @implementation RCTInternalGenericWeakWrapper @end diff --git a/packages/react-native/ReactCommon/react/utils/RunLoopObserver.cpp b/packages/react-native/ReactCommon/react/utils/RunLoopObserver.cpp index c957c43b42f..e075c8c8b69 100644 --- a/packages/react-native/ReactCommon/react/utils/RunLoopObserver.cpp +++ b/packages/react-native/ReactCommon/react/utils/RunLoopObserver.cpp @@ -9,8 +9,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { RunLoopObserver::RunLoopObserver( Activity activities, @@ -59,5 +58,4 @@ RunLoopObserver::WeakOwner RunLoopObserver::getOwner() const noexcept { return owner_; } -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/utils/RunLoopObserver.h b/packages/react-native/ReactCommon/react/utils/RunLoopObserver.h index 469d8c26626..b810856175b 100644 --- a/packages/react-native/ReactCommon/react/utils/RunLoopObserver.h +++ b/packages/react-native/ReactCommon/react/utils/RunLoopObserver.h @@ -11,8 +11,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * A cross-platform abstraction for observing a run loop life cycle. @@ -125,5 +124,4 @@ class RunLoopObserver { mutable std::atomic enabled_{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/utils/SharedFunction.h b/packages/react-native/ReactCommon/react/utils/SharedFunction.h index e834f0cf018..70db3e378bd 100644 --- a/packages/react-native/ReactCommon/react/utils/SharedFunction.h +++ b/packages/react-native/ReactCommon/react/utils/SharedFunction.h @@ -9,8 +9,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * `SharedFunction` implements a pattern of a shared callable object that @@ -56,5 +55,4 @@ class SharedFunction { std::shared_ptr pair_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/utils/SimpleThreadSafeCache.h b/packages/react-native/ReactCommon/react/utils/SimpleThreadSafeCache.h index 3954d951f0f..4710b2c55c0 100644 --- a/packages/react-native/ReactCommon/react/utils/SimpleThreadSafeCache.h +++ b/packages/react-native/ReactCommon/react/utils/SimpleThreadSafeCache.h @@ -12,8 +12,7 @@ #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Simple thread-safe LRU cache. @@ -72,5 +71,4 @@ class SimpleThreadSafeCache { mutable std::mutex mutex_; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/utils/Telemetry.h b/packages/react-native/ReactCommon/react/utils/Telemetry.h index 2071ff6c70f..45d9dd64c85 100644 --- a/packages/react-native/ReactCommon/react/utils/Telemetry.h +++ b/packages/react-native/ReactCommon/react/utils/Telemetry.h @@ -10,8 +10,7 @@ #include #include -namespace facebook { -namespace react { +namespace facebook::react { /* * Represents a monotonic clock suitable for measuring intervals. @@ -111,5 +110,4 @@ static inline int64_t telemetryDurationToMilliseconds( .count(); } -} // namespace react -} // namespace facebook +} // namespace facebook::react