// Set, reset, flip
BitVector &set() {
- if (Bits) {
- init_words(Bits, Capacity, true);
- clear_unused_bits();
- }
+ init_words(Bits, Capacity, true);
+ clear_unused_bits();
return *this;
}
}
BitVector &reset() {
- if (Bits)
- init_words(Bits, Capacity, false);
+ init_words(Bits, Capacity, false);
return *this;
}
std::copy(Bits, &Bits[OldCapacity], NewBits);
// Destroy the old bits.
- if (Bits)
- delete[] Bits;
+ delete[] Bits;
Bits = NewBits;
}
void init_words(BitWord *B, unsigned NumWords, bool t) {
- if (B)
- memset(B, 0 - (int)t, NumWords*sizeof(BitWord));
+ memset(B, 0 - (int)t, NumWords*sizeof(BitWord));
}
};