MCPcopy Create free account
hub / github.com/chen3feng/toft / Get32

Method Get32

encoding/varint.cpp:123–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123bool 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
135const char* Varint::Decode64(const char* p, const char* limit, uint64_t* value) {
136 uint64_t result = 0;

Callers

nothing calls this directly

Calls 3

StringPieceClass · 0.85
dataMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected