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

Method readInt64

Core/CodedInputData.cpp:56–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56int64_t CodedInputData::readInt64() {
57 int32_t shift = 0;
58 int64_t result = 0;
59 while (shift < 64) {
60 int8_t b = this->readRawByte();
61 result |= (int64_t)(b & 0x7f) << shift;
62 if ((b & 0x80) == 0) {
63 return result;
64 }
65 shift += 7;
66 }
67 throw invalid_argument("InvalidProtocolBuffer malformedInt64");
68}
69
70uint64_t CodedInputData::readUInt64() {
71 return static_cast<uint64_t>(readInt64());

Callers 2

getInt64Method · 0.80
decodeOneVectorMethod · 0.80

Calls 1

readRawByteMethod · 0.95

Tested by

no test coverage detected