MCPcopy Create free account
hub / github.com/defold/defold / ReadVarInt64

Method ReadVarInt64

engine/ddf/src/ddf/ddf_inputbuffer.cpp:90–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88 }
89
90 bool InputBuffer::ReadVarInt64(uint64_t* value)
91 {
92 uint64_t result = 0;
93 int count = 0;
94
95 while (true)
96 {
97 if (m_Current >= m_End || count == WIRE_MAXVARINTBYTES)
98 return false;
99
100 uint32_t b = *m_Current++;
101 result |= ((uint64_t) (b & 0x7f)) << (7 * count);
102 count++;
103
104 if (!(b & 0x80))
105 {
106 break;
107 }
108 }
109
110 *value = result;
111 return true;
112 }
113
114 bool InputBuffer::ReadFixed32(uint32_t *value)
115 {

Callers 1

SkipFieldFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected