diff options
-rw-r--r-- | base/lock.cc | 4 | ||||
-rw-r--r-- | base/lock.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/base/lock.cc b/base/lock.cc index 9f3c34d..70fa044 100644 --- a/base/lock.cc +++ b/base/lock.cc @@ -15,8 +15,8 @@ #include "base/logging.h" Lock::Lock() - : lock_() - , recursion_count_shadow_(0) { + : lock_(), + recursion_count_shadow_(0) { #ifndef NDEBUG recursion_used_ = false; acquisition_count_ = 0; diff --git a/base/lock.h b/base/lock.h index ee22fa6..4e736af 100644 --- a/base/lock.h +++ b/base/lock.h @@ -55,7 +55,7 @@ class Lock { // A helper class that acquires the given Lock while the AutoLock is in scope. class AutoLock { public: - AutoLock(Lock& lock) : lock_(lock) { + explicit AutoLock(Lock& lock) : lock_(lock) { lock_.Acquire(); } |