| 130 | |
| 131 | template<class IndexType> |
| 132 | forceinline void |
| 133 | BitSet<IndexType>::replace_and_decrease(IndexType i, BitSetData w) { |
| 134 | assert(_limit > 0U); |
| 135 | BitSetData w_i = _bits[i]; |
| 136 | if (w != w_i) { |
| 137 | _bits[i] = w; |
| 138 | if (w.none()) { |
| 139 | assert(_bits[i].none()); |
| 140 | _limit--; |
| 141 | _bits[i] = _bits[_limit]; |
| 142 | _index[i] = _index[_limit]; |
| 143 | } |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | template<class IndexType> |
| 148 | forceinline void |