Skip to content

Commit c97741d

Browse files
generatedunixname537391475639613facebook-github-bot
authored andcommitted
xplat/js/react-native-github/packages/react-native/ReactCommon/react/performance/timeline/tests/PerformanceEntryReporterTest.cpp (facebook#52780)
Summary: Pull Request resolved: facebook#52780 Reviewed By: rshest Differential Revision: D78798597 fbshipit-source-id: 28cdd8b2fdd4c5d5889f527ee7574f87e18215a7
1 parent fb45877 commit c97741d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/react-native/ReactCommon/react/performance/timeline/tests/PerformanceEntryReporterTest.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include "../PerformanceEntryReporter.h"
1313

14+
#include <array>
1415
#include <variant>
1516

1617
using namespace facebook::react;
@@ -46,13 +47,13 @@ namespace facebook::react {
4647
[[maybe_unused]] static std::ostream& operator<<(
4748
std::ostream& os,
4849
const PerformanceEntry& entry) {
49-
static constexpr const char* entryTypeNames[] = {
50+
static constexpr auto entryTypeNames = std::to_array<const char*>({
5051
"PerformanceEntryType::UNDEFINED",
5152
"PerformanceEntryType::MARK",
5253
"PerformanceEntryType::MEASURE",
5354
"PerformanceEntryType::EVENT",
5455
"PerformanceEntryType::RESOURCE",
55-
};
56+
});
5657

5758
return std::visit(
5859
[&](const auto& entryDetails) -> std::ostream& {

0 commit comments

Comments
 (0)