Skip to content

Commit 330dd62

Browse files
committed
Merge #31: Use memory_order symbols consistently
93ee8d8 Merge pull request google#965 from ShawnZhong:cpp20 (Victor Costan) Pull request description: This is cherry-picked from upstream and can be dropped when upstream is fully synced to include the commit. For now this is needed for two reasons: * Consistently use the same symbol names in the whole project. * Compiling with C++20 fails. ACKs for top commit: achow101: ACK 93ee8d8 Tree-SHA512: 3ab48f003cd01ff9dce2da8d68085fa5ff100c3e6de75a0a4b4dd1b669d78577c85d7663906441a410d8c96965fc059a574ff6ef9b2741f9a49bd31d65acb896
2 parents f8ae182 + 93ee8d8 commit 330dd62

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

util/env_posix.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ class SingletonEnv {
850850
public:
851851
SingletonEnv() {
852852
#if !defined(NDEBUG)
853-
env_initialized_.store(true, std::memory_order::memory_order_relaxed);
853+
env_initialized_.store(true, std::memory_order_relaxed);
854854
#endif // !defined(NDEBUG)
855855
static_assert(sizeof(env_storage_) >= sizeof(EnvType),
856856
"env_storage_ will not fit the Env");
@@ -867,7 +867,7 @@ class SingletonEnv {
867867

868868
static void AssertEnvNotInitialized() {
869869
#if !defined(NDEBUG)
870-
assert(!env_initialized_.load(std::memory_order::memory_order_relaxed));
870+
assert(!env_initialized_.load(std::memory_order_relaxed));
871871
#endif // !defined(NDEBUG)
872872
}
873873

util/env_windows.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ class SingletonEnv {
798798
public:
799799
SingletonEnv() {
800800
#if !defined(NDEBUG)
801-
env_initialized_.store(true, std::memory_order::memory_order_relaxed);
801+
env_initialized_.store(true, std::memory_order_relaxed);
802802
#endif // !defined(NDEBUG)
803803
static_assert(sizeof(env_storage_) >= sizeof(EnvType),
804804
"env_storage_ will not fit the Env");
@@ -815,7 +815,7 @@ class SingletonEnv {
815815

816816
static void AssertEnvNotInitialized() {
817817
#if !defined(NDEBUG)
818-
assert(!env_initialized_.load(std::memory_order::memory_order_relaxed));
818+
assert(!env_initialized_.load(std::memory_order_relaxed));
819819
#endif // !defined(NDEBUG)
820820
}
821821

0 commit comments

Comments
 (0)