From 9314597d4b742ed6f95665241345e590a0f5759b Mon Sep 17 00:00:00 2001 From: Dan Minor Date: Tue, 28 Mar 2017 16:04:41 -0400 Subject: Mark single argument constructors in mutex.h as explicit. --- src/mutex.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mutex.h b/src/mutex.h index 1648c2f..7d7c364 100644 --- a/src/mutex.h +++ b/src/mutex.h @@ -166,7 +166,7 @@ class Mutex { // It inhibits work being done by the destructor, which makes it // safer for code that tries to acqiure this mutex in their global // destructor. - inline Mutex(LinkerInitialized); + explicit inline Mutex(LinkerInitialized); // Destructor inline ~Mutex(); @@ -197,7 +197,7 @@ class Mutex { inline void SetIsSafe() { is_safe_ = true; } // Catch the error of writing Mutex when intending MutexLock. - Mutex(Mutex* /*ignored*/) {} + explicit Mutex(Mutex* /*ignored*/) {} // Disallow "evil" constructors Mutex(const Mutex&); void operator=(const Mutex&); -- cgit v1.2.3