MCPcopy Create free account
hub / github.com/Tencent/MMKV / writeRawVarint64

Method writeRawVarint64

Core/CodedOutputData.cpp:152–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void CodedOutputData::writeRawVarint64(int64_t value) {
153 while (true) {
154 if ((value & ~0x7f) == 0) {
155 this->writeRawByte(static_cast<uint8_t>(value));
156 return;
157 } else {
158 this->writeRawByte(static_cast<uint8_t>((value & 0x7f) | 0x80));
159 value = logicalRightShift64(value, 7);
160 }
161 }
162}
163
164void CodedOutputData::writeRawLittleEndian32(int32_t value) {
165 this->writeRawByte(static_cast<uint8_t>((value) &0xff));

Callers 2

writeInt64Method · 0.95
writeInt32Method · 0.95

Calls 2

writeRawByteMethod · 0.95
logicalRightShift64Function · 0.85

Tested by

no test coverage detected