| 821 | |
| 822 | |
| 823 | void BitBuffer::appendBits(std::uint32_t val, int len) { |
| 824 | if (len < 0 || len > 31 || val >> len != 0) |
| 825 | throw std::domain_error("Value out of range"); |
| 826 | for (int i = len - 1; i >= 0; i--) // Append bit by bit |
| 827 | this->push_back(((val >> i) & 1) != 0); |
| 828 | } |
| 829 | |
| 830 | } |
no outgoing calls
no test coverage detected