aboutsummaryrefslogtreecommitdiff
path: root/src/zenremotestore/chunking/chunkingcache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenremotestore/chunking/chunkingcache.cpp')
-rw-r--r--src/zenremotestore/chunking/chunkingcache.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/zenremotestore/chunking/chunkingcache.cpp b/src/zenremotestore/chunking/chunkingcache.cpp
index 7f0a26330..e9b783a00 100644
--- a/src/zenremotestore/chunking/chunkingcache.cpp
+++ b/src/zenremotestore/chunking/chunkingcache.cpp
@@ -75,13 +75,13 @@ public:
{
Lock.ReleaseNow();
RwLock::ExclusiveLockScope EditLock(m_Lock);
- if (auto RemoveIt = m_PathHashToEntry.find(PathHash); It != m_PathHashToEntry.end())
+ if (auto RemoveIt = m_PathHashToEntry.find(PathHash); RemoveIt != m_PathHashToEntry.end())
{
- CachedEntry& DeleteEntry = m_Entries[It->second];
+ CachedEntry& DeleteEntry = m_Entries[RemoveIt->second];
DeleteEntry.Chunked = {};
DeleteEntry.ModificationTick = 0;
- m_FreeEntryIndexes.push_back(It->second);
- m_PathHashToEntry.erase(It);
+ m_FreeEntryIndexes.push_back(RemoveIt->second);
+ m_PathHashToEntry.erase(RemoveIt);
}
}
}
@@ -461,6 +461,8 @@ namespace chunkingcache_testutils {
}
} // namespace chunkingcache_testutils
+TEST_SUITE_BEGIN("remotestore.chunkingcache");
+
TEST_CASE("chunkingcache.nullchunkingcache")
{
using namespace chunkingcache_testutils;
@@ -617,6 +619,8 @@ TEST_CASE("chunkingcache.diskchunkingcache")
}
}
+TEST_SUITE_END();
+
void
chunkingcache_forcelink()
{