From 192cff271b2bbc0618a3c283be4adabbebb9ae3f Mon Sep 17 00:00:00 2001 From: CodemodService Bot Date: Fri, 18 Jul 2025 06:55:06 -0700 Subject: [PATCH] Fix CQS signal modernize-use-using in xplat/js/react-native-github/packages [B] (#52693) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52693 Reviewed By: dtolnay Differential Revision: D78494711 --- packages/react-native/React/Views/RCTFont.mm | 4 ++-- packages/react-native/ReactCommon/cxxreact/CxxModule.h | 4 ++-- .../react-native/ReactCommon/cxxreact/JsArgumentHelpers.h | 4 ++-- packages/react-native/ReactCommon/logger/react_native_log.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/react-native/React/Views/RCTFont.mm b/packages/react-native/React/Views/RCTFont.mm index fe350138fd9..ed6425e9cf2 100644 --- a/packages/react-native/React/Views/RCTFont.mm +++ b/packages/react-native/React/Views/RCTFont.mm @@ -205,7 +205,7 @@ RCT_ENUM_CONVERTER( UIFontWeightRegular, doubleValue) -typedef BOOL RCTFontStyle; +using RCTFontStyle = BOOL; RCT_ENUM_CONVERTER( RCTFontStyle, (@{ @@ -216,7 +216,7 @@ RCT_ENUM_CONVERTER( NO, boolValue) -typedef NSDictionary RCTFontVariantDescriptor; +using RCTFontVariantDescriptor = NSDictionary; + (RCTFontVariantDescriptor *)RCTFontVariantDescriptor:(id)json { static NSDictionary *mapping; diff --git a/packages/react-native/ReactCommon/cxxreact/CxxModule.h b/packages/react-native/ReactCommon/cxxreact/CxxModule.h index fed1a7353a3..a825c401388 100644 --- a/packages/react-native/ReactCommon/cxxreact/CxxModule.h +++ b/packages/react-native/ReactCommon/cxxreact/CxxModule.h @@ -53,9 +53,9 @@ class CxxModule { class SyncTagType {}; public: - typedef std::function()> Provider; + using Provider = std::function()>; - typedef std::function)> Callback; + using Callback = std::function)>; constexpr static AsyncTagType AsyncTag = AsyncTagType(); constexpr static SyncTagType SyncTag = SyncTagType(); diff --git a/packages/react-native/ReactCommon/cxxreact/JsArgumentHelpers.h b/packages/react-native/ReactCommon/cxxreact/JsArgumentHelpers.h index 9a907017985..cf5343cb3e7 100644 --- a/packages/react-native/ReactCommon/cxxreact/JsArgumentHelpers.h +++ b/packages/react-native/ReactCommon/cxxreact/JsArgumentHelpers.h @@ -68,8 +68,8 @@ namespace detail { // only for types compatible with folly::dynamic. template struct is_dynamic { - typedef typename std:: - enable_if::value, T>::type type; + using type = typename std:: + enable_if::value, T>::type; }; } // end namespace detail diff --git a/packages/react-native/ReactCommon/logger/react_native_log.h b/packages/react-native/ReactCommon/logger/react_native_log.h index 5f585efa428..a05b4c6e6a3 100644 --- a/packages/react-native/ReactCommon/logger/react_native_log.h +++ b/packages/react-native/ReactCommon/logger/react_native_log.h @@ -14,7 +14,7 @@ enum ReactNativeLogLevel { ReactNativeLogLevelFatal = 4 }; -typedef void (*reactnativelogfunctype)(ReactNativeLogLevel, const char*); +using reactnativelogfunctype = void (*)(ReactNativeLogLevel, const char*); #ifdef __cplusplus extern "C" {