aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-03-21 10:21:09 +0100
committerDan Engelbrecht <[email protected]>2022-03-31 11:28:33 +0200
commit9e4286f047c7eb6f30114960ada3d6e46eee3ed6 (patch)
treee16b071ca83746699cb7d8e390fd7f003a6e8b6a
parentInclude cleanup (diff)
downloadzen-9e4286f047c7eb6f30114960ada3d6e46eee3ed6.tar.xz
zen-9e4286f047c7eb6f30114960ada3d6e46eee3ed6.zip
Use constants for max block index and max block offset
-rw-r--r--zenstore/compactcas.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/zenstore/compactcas.h b/zenstore/compactcas.h
index dd3385de3..01cfffa52 100644
--- a/zenstore/compactcas.h
+++ b/zenstore/compactcas.h
@@ -55,8 +55,8 @@ private:
inline void Init(uint32_t BlockIndex, uint64_t Offset, uint64_t Size)
{
- ZEN_ASSERT(BlockIndex < (1L << 20));
- ZEN_ASSERT(Offset < (1L << 28));
+ ZEN_ASSERT(BlockIndex <= MaxBlockIndex);
+ ZEN_ASSERT(Offset <= MaxOffset);
ZEN_ASSERT(Size <= std::numeric_limits<std::uint32_t>::max());
m_Size = static_cast<uint32_t>(Size);