* Appends the least-significant bits, from value, in order from most-significant to * least-significant. For example, appending 6 bits from 0x000001E will append the bits * 0, 1, 1, 1, 1, 0 in that order. * * @param value int containing bits to append * @param numBits bits from value to append */
| 74 | * @param numBits bits from value to append |
| 75 | */ |
| 76 | void appendBits(int value, int numBits) |
| 77 | { |
| 78 | for (; numBits; --numBits) |
| 79 | _bits.push_back((value >> (numBits-1)) & 1); |
| 80 | } |
| 81 | |
| 82 | void appendBit(bool bit) { _bits.push_back(bit); } |
| 83 |
no test coverage detected