aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzousar <[email protected]>2023-12-05 23:37:58 -0700
committerzousar <[email protected]>2023-12-05 23:37:58 -0700
commit1e3fbd753aaeaeabeb4ef383f64b32042c492337 (patch)
tree99a12bf220d8330d5be6e6ce2a818a6e0abf495c /src
parentGet hash when retrieving chunks (diff)
downloadzen-1e3fbd753aaeaeabeb4ef383f64b32042c492337.tar.xz
zen-1e3fbd753aaeaeabeb4ef383f64b32042c492337.zip
Ran precommit
Diffstat (limited to 'src')
-rw-r--r--src/zenserver/projectstore/projectstore.cpp8
-rw-r--r--src/zenserver/projectstore/projectstore.h2
2 files changed, 3 insertions, 7 deletions
diff --git a/src/zenserver/projectstore/projectstore.cpp b/src/zenserver/projectstore/projectstore.cpp
index cf827b22e..8bc49c55f 100644
--- a/src/zenserver/projectstore/projectstore.cpp
+++ b/src/zenserver/projectstore/projectstore.cpp
@@ -752,8 +752,7 @@ ProjectStore::Oplog::GetAllChunksInfo()
}
void
-ProjectStore::Oplog::IterateChunkMap(
- std::function<void(const Oid&, const IoHash&)>&& Fn)
+ProjectStore::Oplog::IterateChunkMap(std::function<void(const Oid&, const IoHash&)>&& Fn)
{
RwLock::SharedLockScope _(m_OplogLock);
if (!m_Storage)
@@ -2252,10 +2251,7 @@ ProjectStore::GetProjectChunks(const std::string_view ProjectId, const std::stri
Project->TouchOplog(OplogId);
std::vector<std::pair<Oid, IoHash>> ChunkInfos;
- FoundLog->IterateChunkMap([&ChunkInfos](const Oid& Id, const IoHash& Hash) {
- ChunkInfos.push_back({Id, Hash});
- });
-
+ FoundLog->IterateChunkMap([&ChunkInfos](const Oid& Id, const IoHash& Hash) { ChunkInfos.push_back({Id, Hash}); });
CbObjectWriter Response;
Response.BeginArray("chunks"sv);
diff --git a/src/zenserver/projectstore/projectstore.h b/src/zenserver/projectstore/projectstore.h
index 813af9b37..27cb092a2 100644
--- a/src/zenserver/projectstore/projectstore.h
+++ b/src/zenserver/projectstore/projectstore.h
@@ -93,7 +93,7 @@ public:
};
std::vector<ChunkInfo> GetAllChunksInfo();
- void IterateChunkMap(std::function<void(const Oid&, const IoHash& Hash)>&& Fn);
+ void IterateChunkMap(std::function<void(const Oid&, const IoHash& Hash)>&& Fn);
void IterateFileMap(std::function<void(const Oid&, const std::string_view& ServerPath, const std::string_view& ClientPath)>&& Fn);
void IterateOplog(std::function<void(CbObjectView)>&& Fn);
void IterateOplogWithKey(std::function<void(int, const Oid&, CbObjectView)>&& Fn);