diff options
| author | Stefan Boberg <[email protected]> | 2023-05-15 21:21:36 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2023-05-15 21:21:36 +0200 |
| commit | dd3db5cd2fd2870fb743234f9c2ce77f74fa52c1 (patch) | |
| tree | 02f9ded3a341d7c47bb9ba1a3fdc485d21801a67 /src/zenstore/cidstore.cpp | |
| parent | add 7z dependency to xmake file (diff) | |
| download | zen-dd3db5cd2fd2870fb743234f9c2ce77f74fa52c1.tar.xz zen-dd3db5cd2fd2870fb743234f9c2ce77f74fa52c1.zip | |
CidStore::Impl explicit constructor, fixed #ifndef NDEBUG
Diffstat (limited to 'src/zenstore/cidstore.cpp')
| -rw-r--r-- | src/zenstore/cidstore.cpp | 7 |
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); |