aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-05-15 21:21:36 +0200
committerStefan Boberg <[email protected]>2023-05-15 21:21:36 +0200
commitdd3db5cd2fd2870fb743234f9c2ce77f74fa52c1 (patch)
tree02f9ded3a341d7c47bb9ba1a3fdc485d21801a67 /src
parentadd 7z dependency to xmake file (diff)
downloadzen-dd3db5cd2fd2870fb743234f9c2ce77f74fa52c1.tar.xz
zen-dd3db5cd2fd2870fb743234f9c2ce77f74fa52c1.zip
CidStore::Impl explicit constructor, fixed #ifndef NDEBUG
Diffstat (limited to 'src')
-rw-r--r--src/zenstore/cidstore.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/zenstore/cidstore.cpp b/src/zenstore/cidstore.cpp
index 8d4679128..734ae8433 100644
--- a/src/zenstore/cidstore.cpp
+++ b/src/zenstore/cidstore.cpp
@@ -17,7 +17,7 @@ namespace zen {
struct CidStore::Impl
{
- Impl(CasStore& InCasStore) : m_CasStore(InCasStore) {}
+ explicit Impl(CasStore& InCasStore) : m_CasStore(InCasStore) {}
CasStore& m_CasStore;
@@ -25,11 +25,12 @@ struct CidStore::Impl
CidStore::InsertResult AddChunk(const IoBuffer& ChunkData, const IoHash& RawHash, CidStore::InsertMode Mode)
{
-#ifndef NDEBUG
+#if ZEN_BUILD_DEBUG
IoHash VerifyRawHash;
uint64_t _;
ZEN_ASSERT(CompressedBuffer::ValidateCompressedHeader(ChunkData, VerifyRawHash, _) && RawHash == VerifyRawHash);
-#endif // NDEBUG
+#endif
+
IoBuffer Payload(ChunkData);
Payload.SetContentType(ZenContentType::kCompressedBinary);