From cf9c514b1b4678c361b695a621853c180cf724d3 Mon Sep 17 00:00:00 2001 From: greg Date: Sun, 7 Apr 2019 09:42:02 -0400 Subject: [PATCH] Update phmap_base.h --- parallel_hashmap/phmap_base.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/parallel_hashmap/phmap_base.h b/parallel_hashmap/phmap_base.h index 365f4f7..332e5a0 100644 --- a/parallel_hashmap/phmap_base.h +++ b/parallel_hashmap/phmap_base.h @@ -4585,7 +4585,7 @@ public: m_(&m), locked_(false) { try_lock(m); } - ~ScopedLock() { if (locked__) m_->unlock(); } + ~ScopedLock() { if (locked_) m_->unlock(); } void lock() { if (!locked_) { m_->lock(); locked_ = true; } } @@ -4624,9 +4624,10 @@ template class Lockable : public Mutex, public LockableBase { public: - using SharedLock = LockableBase::ScopedLock; - using UniqueLock = LockableBase::ScopedLock; - using UpgradeToUnique = LockableBase::DoNothing; // we already have unique ownership + using Base = LockableBase; + using SharedLock = Base::ScopedLock; + using UniqueLock = Base::ScopedLock; + using UpgradeToUnique = Base::DoNothing; // we already have unique ownership }; #if defined(BOOST_THREAD_SHARED_MUTEX_HPP) && defined(BOOST_THREAD_LOCK_TYPES_HPP)