| 54 | } |
| 55 | |
| 56 | int64_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 | |
| 70 | uint64_t CodedInputData::readUInt64() { |
| 71 | return static_cast<uint64_t>(readInt64()); |
no test coverage detected