瀏覽代碼

Merge pull request #965 from ShawnZhong:cpp20

PiperOrigin-RevId: 420504266
xry
Victor Costan 2 年之前
父節點
當前提交
e4ccaa0c9c
共有 2 個檔案被更改,包括 4 行新增4 行删除
  1. +2
    -2
      util/env_posix.cc
  2. +2
    -2
      util/env_windows.cc

+ 2
- 2
util/env_posix.cc 查看文件

@ -870,7 +870,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");
@ -887,7 +887,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)
}

+ 2
- 2
util/env_windows.cc 查看文件

@ -765,7 +765,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");
@ -782,7 +782,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)
}

Loading…
取消
儲存