| 48 | } |
| 49 | |
| 50 | char* Varint::UnsafeEncode64(char* dst, uint64_t v) { |
| 51 | unsigned char* ptr = reinterpret_cast<unsigned char*>(dst); |
| 52 | while (v >= static_cast<uint64_t>(kIncompleteMask)) { |
| 53 | *(ptr++) = (v & (kIncompleteMask - 1)) | kIncompleteMask; |
| 54 | v >>= 7; |
| 55 | } |
| 56 | *(ptr++) = static_cast<unsigned char>(v); |
| 57 | return reinterpret_cast<char*>(ptr); |
| 58 | } |
| 59 | |
| 60 | void Varint::Put64(std::string* dst, uint64_t v) { |
| 61 | char buf[10]; |
nothing calls this directly
no outgoing calls
no test coverage detected