MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / appendData

Method appendData

Libraries/QRCode/tests/BitBuffer.cpp:55–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54
55void qrcodegen::BitBuffer::appendData(const QrSegment &seg) {
56 size_t newBitLen = bitLength + seg.bitLength;
57 while (data.size() * 8 < newBitLen)
58 data.push_back(0);
59 for (int i = 0; i < seg.bitLength; i++, bitLength++) { // Append bit by bit
60 int bit = (seg.data.at(i >> 3) >> (7 - (i & 7))) & 1;
61 data.at(bitLength >> 3) |= bit << (7 - (bitLength & 7));
62 }
63}

Callers 1

encodeSegmentsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected