diff options
author | Abseil Team <absl-team@google.com> | 2023-09-08 07:52:22 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-09-08 07:53:12 -0700 |
commit | 792e55fc0d373b80e4712a6d01ee1834067ef9bd (patch) | |
tree | 000955ef3a0f22c551707b75d7ad6be9ce1b1a6d /absl/synchronization/mutex.h | |
parent | 6644e5bbbd39bcdd2a33ff7c08d2663a65279e9c (diff) | |
download | abseil-792e55fc0d373b80e4712a6d01ee1834067ef9bd.tar.gz abseil-792e55fc0d373b80e4712a6d01ee1834067ef9bd.tar.bz2 abseil-792e55fc0d373b80e4712a6d01ee1834067ef9bd.zip |
Rollback:
absl: remove special handling of Condition::kTrue
absl: remove known_false condition in Mutex code
There are some test breakages.
PiperOrigin-RevId: 563751370
Change-Id: Ie14dc799e0a0d286a7e1b47f0a9bbe59dfb23f70
Diffstat (limited to 'absl/synchronization/mutex.h')
-rw-r--r-- | absl/synchronization/mutex.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/absl/synchronization/mutex.h b/absl/synchronization/mutex.h index 6459053b..ff4747b5 100644 --- a/absl/synchronization/mutex.h +++ b/absl/synchronization/mutex.h @@ -833,10 +833,10 @@ class Condition { #endif // Function with which to evaluate callbacks and/or arguments. - bool (*const eval_)(const Condition*); + bool (*eval_)(const Condition*) = nullptr; // Either an argument for a function call or an object for a method call. - void* const arg_; + void* arg_ = nullptr; // Various functions eval_ can point to: static bool CallVoidPtrFunction(const Condition*); @@ -859,10 +859,8 @@ class Condition { std::memcpy(callback, callback_, sizeof(*callback)); } - static bool AlwaysTrue(const Condition*) { return true; } - // Used only to create kTrue. - constexpr Condition() : eval_(AlwaysTrue), arg_(nullptr) {} + constexpr Condition() = default; }; // ----------------------------------------------------------------------------- |