提交 9314597d 编写于 作者: D Dan Minor 提交者: Andreas Schuh

Mark single argument constructors in mutex.h as explicit.

上级 30dbc81f
......@@ -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&);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册