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

Function ReadOffsets

libs/indexer/feature.cpp:131–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void ReadOffsets(SharedLoadInfo const & loadInfo, ArrayByteSource & src, uint8_t mask,
132 FeatureType::GeometryOffsets & offsets)
133{
134 ASSERT(offsets.empty(), ());
135 ASSERT_GREATER(mask, 0, ());
136
137 offsets.resize(loadInfo.GetScalesCount(), kInvalidOffset);
138 size_t ind = 0;
139
140 while (mask > 0)
141 {
142 if (mask & 0x01)
143 offsets[ind] = ReadVarUint<uint32_t>(src);
144
145 ++ind;
146 mask = mask >> 1;
147 }
148}
149
150class BitSource
151{

Callers 1

ParseHeader2Method · 0.85

Calls 4

ASSERTFunction · 0.85
emptyMethod · 0.45
resizeMethod · 0.45
GetScalesCountMethod · 0.45

Tested by

no test coverage detected