mirror of
https://github.com/status-im/qzxing.git
synced 2025-01-27 03:04:47 +00:00
added appendBitArray to BitArray
This commit is contained in:
parent
e6e82548ab
commit
84d3f773ba
@ -179,6 +179,15 @@ void BitArray::appendBits(int value, int numBits)
|
||||
}
|
||||
}
|
||||
|
||||
void BitArray::appendBitArray(const BitArray& other)
|
||||
{
|
||||
int otherSize = other.size;
|
||||
ensureCapacity(size + otherSize);
|
||||
for (int i = 0; i < otherSize; i++) {
|
||||
appendBit(other.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
void BitArray::ensureCapacity(int size)
|
||||
{
|
||||
if (size > bits->size() * 32)
|
||||
|
@ -64,6 +64,7 @@ public:
|
||||
|
||||
void appendBit(bool bit);
|
||||
void appendBits(int value, int numBits);
|
||||
void appendBitArray(const BitArray& other);
|
||||
void ensureCapacity(int size);
|
||||
|
||||
void xor_(const BitArray& other);
|
||||
|
Loading…
x
Reference in New Issue
Block a user