From 8246081588870f7afcefacd9ea5fbcc44bfa4c47 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Wed, 30 Mar 2022 13:09:48 +0200 Subject: cleanup --- zenserver/cache/structuredcachestore.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'zenserver/cache/structuredcachestore.cpp') diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp index 3d7fac13b..66240f0c6 100644 --- a/zenserver/cache/structuredcachestore.cpp +++ b/zenserver/cache/structuredcachestore.cpp @@ -249,11 +249,9 @@ ZenCacheMemoryLayer::Put(std::string_view InBucket, const IoHash& HashKey, const { RwLock::SharedLockScope _(m_Lock); - auto it = m_Buckets.find(std::string(InBucket)); - - if (it != m_Buckets.end()) + if (auto It = m_Buckets.find(std::string(InBucket)); It != m_Buckets.end()) { - Bucket = &it->second; + Bucket = &It->second; } } @@ -263,10 +261,9 @@ ZenCacheMemoryLayer::Put(std::string_view InBucket, const IoHash& HashKey, const RwLock::ExclusiveLockScope _(m_Lock); - auto it = m_Buckets.find(std::string(InBucket)); - if (it != m_Buckets.end()) + if (auto It = m_Buckets.find(std::string(InBucket)); It != m_Buckets.end()) { - Bucket = &it->second; + Bucket = &It->second; } else { -- cgit v1.2.3