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

Method writeRawVarint32

Core/CodedOutputData.cpp:140–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void CodedOutputData::writeRawVarint32(int32_t value) {
141 while (true) {
142 if ((value & ~0x7f) == 0) {
143 this->writeRawByte(static_cast<uint8_t>(value));
144 return;
145 } else {
146 this->writeRawByte(static_cast<uint8_t>((value & 0x7F) | 0x80));
147 value = logicalRightShift32(value, 7);
148 }
149 }
150}
151
152void CodedOutputData::writeRawVarint64(int64_t value) {
153 while (true) {

Callers 7

writeInt32Method · 0.95
writeDataMethod · 0.95
writeStringMethod · 0.95
doAppendDataWithKeyMethod · 0.80
doOverrideDataWithKeyMethod · 0.80
memmoveDictionaryFunction · 0.80
testAESToMMBufferMethod · 0.80

Calls 2

writeRawByteMethod · 0.95
logicalRightShift32Function · 0.85

Tested by

no test coverage detected