mirror of
https://gitee.com/openharmony/developtools_profiler
synced 2024-11-23 15:00:17 +00:00
ProtoEncoder框架代码-清理告警
Signed-off-by: wenlong_12 <wenlong12@huawei.com>
This commit is contained in:
parent
02b10fe22a
commit
b1ef83688c
@ -79,9 +79,9 @@ inline uint32_t EncodeVarint(uint8_t* buf, T v)
|
||||
{
|
||||
// https://developers.google.com/protocol-buffers/docs/encoding
|
||||
// Unsigned Integers and Signed Integers(intN)
|
||||
uint64_t value = (uint64_t)v;
|
||||
uint64_t value = static_cast<uint64_t>(v);
|
||||
uint32_t size = 0;
|
||||
while (value > (uint64_t)VARINT_MAX_1BYTE) {
|
||||
while (value > static_cast<uint64_t>(VARINT_MAX_1BYTE)) {
|
||||
buf[size] = (VARINT_MASK_PAYLOAD & value) | VARINT_MASK_MSB;
|
||||
size++;
|
||||
value >>= VARINT_PAYLOAD_BITS;
|
||||
|
Loading…
Reference in New Issue
Block a user