MCPcopy Create free account
hub / github.com/devilsen/CZXing / ToInts

Function ToInts

czxing/src/main/cpp/zxing/src/BitArray.h:139–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137
138template <typename T = int, typename = std::enable_if_t<std::is_integral_v<T>>>
139std::vector<T> ToInts(const BitArray& bits, int wordSize, int totalWords, int offset = 0)
140{
141 assert(totalWords >= bits.size() / wordSize);
142 assert(wordSize <= 8 * (int)sizeof(T));
143
144 std::vector<T> res(totalWords, 0);
145 for (int i = offset; i < bits.size(); i += wordSize)
146 res[(i - offset) / wordSize] = ToInt(bits, i, wordSize);
147
148 return res;
149}
150
151class BitArrayView
152{

Callers 1

GenerateCheckWordsFunction · 0.85

Calls 2

ToIntFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected