aboutsummaryrefslogtreecommitdiff
path: root/pw_varint/varint.cc
diff options
context:
space:
mode:
authorEwout van Bekkum <ewout@google.com>2020-09-22 16:32:45 -0700
committerCQ Bot Account <commit-bot@chromium.org>2020-09-23 00:38:55 +0000
commitbd33812e829787803b25a0fe4417e5f8315442f7 (patch)
tree469532a609c3d2495e229f3dc1241ef2d859709b /pw_varint/varint.cc
parent6754c4436492a3233aaf645e83ca33c11176bbbf (diff)
downloadpigweed-bd33812e829787803b25a0fe4417e5f8315442f7.tar.gz
pw_varint: expose kMaxVarint{32,64}SizeBytes
Renames the existing pw::varint::kMaxVarintSizeBytes to pw::varint::kMaxVarint64SizeBytes and adds a new pw::varint::kMaxVarint32SizeBytes. Note this does not yet remove pw::varint::kMaxVarintSizeBytes, as the existing users need to be migrated first. Change-Id: Ie57e32b9526347df95282f7bba2d6f2ff34b4a08 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/18686 Reviewed-by: Wyatt Hepler <hepler@google.com> Commit-Queue: Ewout van Bekkum <ewout@google.com>
Diffstat (limited to 'pw_varint/varint.cc')
-rw-r--r--pw_varint/varint.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/pw_varint/varint.cc b/pw_varint/varint.cc
index 9b782c0ef..1c212265a 100644
--- a/pw_varint/varint.cc
+++ b/pw_varint/varint.cc
@@ -53,7 +53,7 @@ extern "C" size_t pw_VarintDecode(const void* input,
const std::byte* buffer = static_cast<const std::byte*>(input);
// The largest 64-bit ints require 10 B.
- const size_t max_count = std::min(kMaxVarintSizeBytes, input_size);
+ const size_t max_count = std::min(kMaxVarint64SizeBytes, input_size);
while (true) {
if (count >= max_count) {