mirror of
https://github.com/google/leveldb.git
synced 2025-04-25 14:00:27 +08:00
Merge 1227982913
into ac691084fd
This commit is contained in:
commit
b0b7340d24
@ -108,7 +108,7 @@ bool GetVarint32(Slice* input, uint32_t* value) {
|
||||
if (q == nullptr) {
|
||||
return false;
|
||||
} else {
|
||||
*input = Slice(q, limit - q);
|
||||
input->remove_prefix(q - p);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -137,7 +137,7 @@ bool GetVarint64(Slice* input, uint64_t* value) {
|
||||
if (q == nullptr) {
|
||||
return false;
|
||||
} else {
|
||||
*input = Slice(q, limit - q);
|
||||
input->remove_prefix(q - p);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ TEST(Coding, Varint32) {
|
||||
ASSERT_EQ(expected, actual);
|
||||
ASSERT_EQ(VarintLength(actual), p - start);
|
||||
}
|
||||
ASSERT_EQ(p, s.data() + s.size());
|
||||
ASSERT_EQ(p, limit);
|
||||
}
|
||||
|
||||
TEST(Coding, Varint64) {
|
||||
|
Loading…
Reference in New Issue
Block a user