From dd3db5cd2fd2870fb743234f9c2ce77f74fa52c1 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Mon, 15 May 2023 21:21:36 +0200 Subject: CidStore::Impl explicit constructor, fixed #ifndef NDEBUG --- src/zenstore/cidstore.cpp | 7 ++++--- 1 file 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); -- cgit v1.2.3