Skip to content

Commit

Permalink
Use C++17 namespace (#41771)
Browse files Browse the repository at this point in the history
Summary:

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
  • Loading branch information
christophpurrer authored and facebook-github-bot committed Dec 4, 2023
1 parent a481ae7 commit d79c52d
Show file tree
Hide file tree
Showing 15 changed files with 659 additions and 875 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ exports[`GenerateModuleCpp can generate a header file NativeModule specs with as
#include \\"RNCodegenModuleFixturesJSI.h\\"
namespace facebook {
namespace react {
namespace facebook::react {
static jsi::Value __hostFunction_NativeArrayTurboModuleCxxSpecJSI_getArray(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
return static_cast<NativeArrayTurboModuleCxxSpecJSI *>(&turboModule)->getArray(
Expand Down Expand Up @@ -818,8 +817,7 @@ NativeStringTurboModuleCxxSpecJSI::NativeStringTurboModuleCxxSpecJSI(std::shared
}
} // namespace react
} // namespace facebook
} // namespace facebook::react
"
`;
Expand All @@ -835,8 +833,7 @@ exports[`GenerateModuleCpp can generate an implementation file NativeModule spec
#include \\"RNCodegenModuleFixturesJSI.h\\"
namespace facebook {
namespace react {
namespace facebook::react {
static jsi::Value __hostFunction_NativeArrayTurboModuleCxxSpecJSI_getArray(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
return static_cast<NativeArrayTurboModuleCxxSpecJSI *>(&turboModule)->getArray(
Expand Down Expand Up @@ -1641,7 +1638,6 @@ NativeStringTurboModuleCxxSpecJSI::NativeStringTurboModuleCxxSpecJSI(std::shared
}
} // namespace react
} // namespace facebook
} // namespace facebook::react
"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ exports[`GenerateModuleH can generate a header file NativeModule specs 1`] = `
#include <ReactCommon/TurboModule.h>
#include <react/bridging/Bridging.h>

namespace facebook {
namespace react {
namespace facebook::react {


class JSI_EXPORT NativeArrayTurboModuleCxxSpecJSI : public TurboModule {
Expand Down Expand Up @@ -2345,8 +2344,7 @@ private:
Delegate delegate_;
};

} // namespace react
} // namespace facebook
} // namespace facebook::react
"
`;

Expand All @@ -2365,8 +2363,7 @@ exports[`GenerateModuleH can generate a header file NativeModule specs with assu
#include <ReactCommon/TurboModule.h>
#include <react/bridging/Bridging.h>

namespace facebook {
namespace react {
namespace facebook::react {


class JSI_EXPORT NativeArrayTurboModuleCxxSpecJSI : public TurboModule {
Expand Down Expand Up @@ -4695,7 +4692,6 @@ private:
Delegate delegate_;
};

} // namespace react
} // namespace facebook
} // namespace facebook::react
"
`;
Loading

0 comments on commit d79c52d

Please sign in to comment.