From 792e55fc0d373b80e4712a6d01ee1834067ef9bd Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Fri, 8 Sep 2023 07:52:22 -0700 Subject: 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 --- absl/synchronization/mutex.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'absl/synchronization/mutex.h') 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; }; // ----------------------------------------------------------------------------- -- cgit v1.2.3