From 55e8345c57bf8d88342f634f279239d19e77826c Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Tue, 20 Jun 2023 21:20:15 -0700 Subject: absl: fix lint errors in Mutex Currently linter warns on all changes: missing #include for 'std::atexit' and single-argument constructors must be marked explicit to avoid unintentional implicit conversions Fix that. PiperOrigin-RevId: 542135136 Change-Id: Ic86649de6baef7f2de71f45875bb66bd730bf6e1 --- absl/synchronization/mutex.cc | 1 + absl/synchronization/mutex.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/absl/synchronization/mutex.cc b/absl/synchronization/mutex.cc index df7577b5..3aa5560a 100644 --- a/absl/synchronization/mutex.cc +++ b/absl/synchronization/mutex.cc @@ -36,6 +36,7 @@ #include #include #include +#include #include #include // NOLINT(build/c++11) diff --git a/absl/synchronization/mutex.h b/absl/synchronization/mutex.h index 184a585a..2fd077c8 100644 --- a/absl/synchronization/mutex.h +++ b/absl/synchronization/mutex.h @@ -513,7 +513,7 @@ class ABSL_LOCKABLE Mutex { base_internal::PerThreadSynch* w); // used for CondVar->Mutex transfer // Catch the error of writing Mutex when intending MutexLock. - Mutex(const volatile Mutex* /*ignored*/) {} // NOLINT(runtime/explicit) + explicit Mutex(const volatile Mutex* /*ignored*/) {} Mutex(const Mutex&) = delete; Mutex& operator=(const Mutex&) = delete; -- cgit v1.2.3