Remove unnecessary bit operation.
This commit is contained in:
parent
1cb3840881
commit
cf1b5f4732
@ -82,7 +82,7 @@ char* EncodeVarint64(char* dst, uint64_t v) {
|
|||||||
static const int B = 128;
|
static const int B = 128;
|
||||||
unsigned char* ptr = reinterpret_cast<unsigned char*>(dst);
|
unsigned char* ptr = reinterpret_cast<unsigned char*>(dst);
|
||||||
while (v >= B) {
|
while (v >= B) {
|
||||||
*(ptr++) = (v & (B-1)) | B;
|
*(ptr++) = v | B;
|
||||||
v >>= 7;
|
v >>= 7;
|
||||||
}
|
}
|
||||||
*(ptr++) = static_cast<unsigned char>(v);
|
*(ptr++) = static_cast<unsigned char>(v);
|
||||||
|
Loading…
Reference in New Issue
Block a user