Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix string key issue with constexpr StrKey in Performance C++ native …
…module Summary: I encountered build error when using performance API in catalyst android mobile app. The error message P617433618 points at using non-const `std::strlen` API in a `constexpr`. ``` $ buck install catalyst-android ... stderr: xplat/js/react-native-github/Libraries/WebPerformance/PerformanceEntryReporter.cpp:208:13: error: constexpr constructor never produces a constant expression [-Winvalid-constexpr] constexpr StrKey(const char *s) ^ xplat/js/react-native-github/Libraries/WebPerformance/PerformanceEntryReporter.cpp:209:39: note: non-constexpr function 'strlen' cannot be used in a constant expression : key(folly::hash::fnv32_buf(s, std::strlen(s))) {} ``` Changelog: [General][Fixed] - Fixed string key calculation in constexpr from Performance C++ native module. Reviewed By: javache Differential Revision: D43136624 fbshipit-source-id: c691671b157b507745c67a505c91f75cf6b878d1
- Loading branch information