Commit 671005ee authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2332] changed the type of Locker::mutex_ to a reference.

may not be a big deal in such a simple case, but just as suggested in review.
parent b6d2a03f
......@@ -85,7 +85,7 @@ public:
/// means an attempt to use the mutex in a wrong way (locking
/// a mutex second time from the same thread, for example).
Locker(Mutex& mutex) :
mutex_(&mutex)
mutex_(mutex)
{
mutex.lock();
}
......@@ -94,10 +94,10 @@ public:
///
/// Unlocks the mutex.
~Locker() {
mutex_->unlock();
mutex_.unlock();
}
private:
Mutex* const mutex_;
Mutex& mutex_;
};
/// \brief If the mutex is currently locked
///
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment