| 29 | } |
| 30 | |
| 31 | static void write_bits( |
| 32 | std::vector<bool>& bits, unsigned& cursor, const std::vector<bool>& src) |
| 33 | { |
| 34 | for (bool bit : src) // Range-based for loop |
| 35 | { |
| 36 | if (cursor < bits.size()) |
| 37 | bits[cursor++] = bit; |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | static void write_bits( |
| 42 | std::vector<bool>& bits, unsigned& cursor, uint64_t data, int width) |