MCPcopy Create free account
hub / github.com/comaps/comaps / Read

Method Read

libs/indexer/feature.cpp:158–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156 explicit BitSource(uint8_t const * p) : m_ptr(p), m_pos(0) {}
157
158 uint8_t Read(uint8_t count)
159 {
160 ASSERT_LESS(count, 9, ());
161
162 uint8_t v = *m_ptr;
163 v >>= m_pos;
164 v &= ((1 << count) - 1);
165
166 m_pos += count;
167 if (m_pos >= 8)
168 {
169 ASSERT_EQUAL(m_pos, 8, ());
170 ++m_ptr;
171 m_pos = 0;
172 }
173
174 return v;
175 }
176
177 uint8_t const * RoundPtr()
178 {

Callers 2

ParseCommonMethod · 0.45
ParseHeader2Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected