| 121 | } |
| 122 | |
| 123 | bool Varint::Get32(StringPiece* input, uint32_t* value) { |
| 124 | const char* p = input->data(); |
| 125 | const char* limit = p + input->size(); |
| 126 | const char* q = Decode32(p, limit, value); |
| 127 | if (q == NULL) { |
| 128 | return false; |
| 129 | } else { |
| 130 | *input = StringPiece(q, limit - q); |
| 131 | return true; |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | const char* Varint::Decode64(const char* p, const char* limit, uint64_t* value) { |
| 136 | uint64_t result = 0; |
nothing calls this directly
no test coverage detected