From 44fedfc928a5ac6b8040fd94907954f0f2f806f1 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Thu, 30 Mar 2017 00:35:59 -0400 Subject: [PATCH] crucible: cache: no need to use explicit lock type C++11 'auto' keyword is sufficient. Signed-off-by: Zygo Blaxell --- include/crucible/cache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/crucible/cache.h b/include/crucible/cache.h index 767b790..d7fa41d 100644 --- a/include/crucible/cache.h +++ b/include/crucible/cache.h @@ -124,7 +124,7 @@ namespace crucible { if (found == m_map.end()) { // No, release cache lock and acquire key lock lock.unlock(); - typename LockSet::Lock key_lock(m_lockset, k); + auto key_lock = m_lockset.make_lock(k); // Did item appear in cache while we were waiting for key? lock.lock(); @@ -197,7 +197,7 @@ namespace crucible { if (found == m_map.end()) { // No, release cache lock and acquire key lock lock.unlock(); - typename LockSet::Lock key_lock(m_lockset, k); + auto key_lock = m_lockset.make_lock(k); // Did item appear in cache while we were waiting for key? lock.lock();