| # | Line 125 | Line 125 | void BitSet::setBits(int fromIndex, int toIndex, bool | |
|---|---|---|
| 125 | std::fill(first, last, value); | |
| 126 | } | |
| 127 | ||
| 128 | + | void BitSet::resize(int nbits) { |
| 129 | + | int oldSize = size(); |
| 130 | + | bitset_.resize(nbits); |
| 131 | + | if (nbits > oldSize) { |
| 132 | + | std::fill(bitset_.begin()+oldSize, bitset_.begin()+nbits+1, false); |
| 133 | + | } |
| 134 | + | } |
| 135 | + | |
| 136 | BitSet operator| (const BitSet& bs1, const BitSet& bs2) { | |
| 137 | assert(bs1.size() == bs2.size()); | |
| 138 | ||
| – | Removed lines |
| + | Added lines |
| < | Changed lines |
| > | Changed lines |