diff --git a/packages/react-native/ReactCommon/react/performance/timeline/tests/PerformanceEntryReporterTest.cpp b/packages/react-native/ReactCommon/react/performance/timeline/tests/PerformanceEntryReporterTest.cpp index bf8aaf06dba9a2..824816d8168472 100644 --- a/packages/react-native/ReactCommon/react/performance/timeline/tests/PerformanceEntryReporterTest.cpp +++ b/packages/react-native/ReactCommon/react/performance/timeline/tests/PerformanceEntryReporterTest.cpp @@ -11,6 +11,7 @@ #include "../PerformanceEntryReporter.h" +#include #include using namespace facebook::react; @@ -46,13 +47,13 @@ namespace facebook::react { [[maybe_unused]] static std::ostream& operator<<( std::ostream& os, const PerformanceEntry& entry) { - static constexpr const char* entryTypeNames[] = { + static constexpr auto entryTypeNames = std::to_array({ "PerformanceEntryType::UNDEFINED", "PerformanceEntryType::MARK", "PerformanceEntryType::MEASURE", "PerformanceEntryType::EVENT", "PerformanceEntryType::RESOURCE", - }; + }); return std::visit( [&](const auto& entryDetails) -> std::ostream& {