fix C++20 compliance with application of upstream PR 965

These symbols are no longer valid on macOS and will fail builds if the `NDEBUG` symbol is defined, as it is now in default build settings for all react-native projects since release of react-native 0.76

This same change was applied upstream but never released, and it appears it has not been applied here

https://github.com/google/leveldb/pull/965#issuecomment-2436371816
This commit is contained in:
Mike Hardy authored and GitHub committed 2024-10-25 19:29:36 -05:00
1 parent 2cc3364406
commit dc346ebc29
1 file changed
+2 -2
+2 -2
View File
@@ -837,7 +837,7 @@ class SingletonEnv {
public:
SingletonEnv() {
#if !defined(NDEBUG)
env_initialized_.store(true, std::memory_order::memory_order_relaxed);
env_initialized_.store(true, std::memory_order_relaxed);
#endif // !defined(NDEBUG)
static_assert(sizeof(env_storage_) >= sizeof(EnvType),
"env_storage_ will not fit the Env");
@@ -854,7 +854,7 @@ class SingletonEnv {
static void AssertEnvNotInitialized() {
#if !defined(NDEBUG)
assert(!env_initialized_.load(std::memory_order::memory_order_relaxed));
assert(!env_initialized_.load(std::memory_order_relaxed));
#endif // !defined(NDEBUG)
}