aboutsummaryrefslogtreecommitdiff
path: root/zenstore/filecas.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-05-02 16:50:08 +0200
committerDan Engelbrecht <[email protected]>2022-05-02 16:50:08 +0200
commit0599d52d80beb85e50ffe1f56c8434376a8c08a2 (patch)
tree9c27adbe6bbbcd79d0153c6167cd385f0ded98e3 /zenstore/filecas.cpp
parentRefactor WriteChunk to not need callback (diff)
downloadzen-0599d52d80beb85e50ffe1f56c8434376a8c08a2.tar.xz
zen-0599d52d80beb85e50ffe1f56c8434376a8c08a2.zip
simplify lambda captures
Diffstat (limited to 'zenstore/filecas.cpp')
-rw-r--r--zenstore/filecas.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/zenstore/filecas.cpp b/zenstore/filecas.cpp
index b53cfaa54..d074a906f 100644
--- a/zenstore/filecas.cpp
+++ b/zenstore/filecas.cpp
@@ -92,7 +92,7 @@ FileCasStrategy::Initialize(bool IsNewStore)
m_CasLog.Open(m_Config.RootDirectory / "cas.ulog", IsNewStore ? CasLogFile::Mode::kTruncate : CasLogFile::Mode::kWrite);
Stopwatch Timer;
- const auto _ = MakeGuard([this, &Timer] {
+ const auto _ = MakeGuard([&] {
ZEN_INFO("read log {} containing {}", m_Config.RootDirectory / "cas.ulog", NiceBytes(m_TotalSize.load(std::memory_order::relaxed)));
});
@@ -692,7 +692,7 @@ FileCasStrategy::CollectGarbage(GcContext& GcCtx)
uint64_t OldTotalSize = m_TotalSize.load(std::memory_order::relaxed);
Stopwatch TotalTimer;
- const auto _ = MakeGuard([this, &TotalTimer, &DeletedCount, &ChunkCount, OldTotalSize] {
+ const auto _ = MakeGuard([&] {
ZEN_INFO("garbage collect for '{}' DONE after {}, deleted {} out of {} files, removed {} out of {}",
m_Config.RootDirectory,
NiceTimeSpanMs(TotalTimer.GetElapsedTimeMs()),