From ee865021c22a47efa4a3eec18e22cbf6ef66aa48 Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Sat, 8 Feb 2025 20:08:19 +0100 Subject: [PATCH] update varint constants --- src/sp/common/VarInt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sp/common/VarInt.cpp b/src/sp/common/VarInt.cpp index db62d06..534a94d 100644 --- a/src/sp/common/VarInt.cpp +++ b/src/sp/common/VarInt.cpp @@ -5,8 +5,8 @@ namespace sp { -static constexpr int SEGMENT_BITS = 0x7F; -static constexpr int CONTINUE_BIT = 0x80; +static constexpr int SEGMENT_BITS = (1 << 7) - 1; +static constexpr int CONTINUE_BIT = 1 << 7; std::size_t VarInt::GetSerializedLength() const { DataBuffer buffer;