mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Use C++17 namespace (#41771)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41771 Changelog: [Internal] Since we are already enforcing C++20 (and 17), we can set the namespace declaration to the C++17 style Reviewed By: NickGerleman Differential Revision: D51789991 fbshipit-source-id: 165d7d4e652d60ab200e2355e084010a02f470a4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
974e584891
commit
b101dd0e34
Vendored
+25
-27
@@ -29,34 +29,32 @@ const ModuleTemplate = ({
|
||||
RCTCxxConvertCategoryTemplate({hasteModuleName, structName: struct.name}),
|
||||
)
|
||||
.join('\n')}
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
${methodSerializationOutputs
|
||||
.map(serializedMethodParts =>
|
||||
InlineHostFunctionTemplate({
|
||||
hasteModuleName,
|
||||
methodName: serializedMethodParts.methodName,
|
||||
returnJSType: serializedMethodParts.returnJSType,
|
||||
selector: serializedMethodParts.selector,
|
||||
}),
|
||||
)
|
||||
.join('\n')}
|
||||
namespace facebook::react {
|
||||
${methodSerializationOutputs
|
||||
.map(serializedMethodParts =>
|
||||
InlineHostFunctionTemplate({
|
||||
hasteModuleName,
|
||||
methodName: serializedMethodParts.methodName,
|
||||
returnJSType: serializedMethodParts.returnJSType,
|
||||
selector: serializedMethodParts.selector,
|
||||
}),
|
||||
)
|
||||
.join('\n')}
|
||||
|
||||
${hasteModuleName}SpecJSI::${hasteModuleName}SpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
${methodSerializationOutputs
|
||||
.map(({methodName, structParamRecords, argCount}) =>
|
||||
MethodMapEntryTemplate({
|
||||
hasteModuleName,
|
||||
methodName,
|
||||
structParamRecords,
|
||||
argCount,
|
||||
}),
|
||||
)
|
||||
.join('\n' + ' '.repeat(8))}
|
||||
}
|
||||
} // namespace react
|
||||
} // namespace facebook`;
|
||||
${hasteModuleName}SpecJSI::${hasteModuleName}SpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
||||
: ObjCTurboModule(params) {
|
||||
${methodSerializationOutputs
|
||||
.map(({methodName, structParamRecords, argCount}) =>
|
||||
MethodMapEntryTemplate({
|
||||
hasteModuleName,
|
||||
methodName,
|
||||
structParamRecords,
|
||||
argCount,
|
||||
}),
|
||||
)
|
||||
.join('\n' + ' '.repeat(8))}
|
||||
}
|
||||
} // namespace facebook::react`;
|
||||
|
||||
const RCTCxxConvertCategoryTemplate = ({
|
||||
hasteModuleName,
|
||||
|
||||
Reference in New Issue
Block a user