mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 10:27:02 +00:00
Remove unnecessary checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34319 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3b515802f6
commit
1f46998b3f
@ -179,10 +179,8 @@ public:
|
|||||||
|
|
||||||
// Set, reset, flip
|
// Set, reset, flip
|
||||||
BitVector &set() {
|
BitVector &set() {
|
||||||
if (Bits) {
|
|
||||||
init_words(Bits, Capacity, true);
|
init_words(Bits, Capacity, true);
|
||||||
clear_unused_bits();
|
clear_unused_bits();
|
||||||
}
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,7 +190,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
BitVector &reset() {
|
BitVector &reset() {
|
||||||
if (Bits)
|
|
||||||
init_words(Bits, Capacity, false);
|
init_words(Bits, Capacity, false);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -317,13 +314,11 @@ private:
|
|||||||
std::copy(Bits, &Bits[OldCapacity], NewBits);
|
std::copy(Bits, &Bits[OldCapacity], NewBits);
|
||||||
|
|
||||||
// Destroy the old bits.
|
// Destroy the old bits.
|
||||||
if (Bits)
|
|
||||||
delete[] Bits;
|
delete[] Bits;
|
||||||
Bits = NewBits;
|
Bits = NewBits;
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_words(BitWord *B, unsigned NumWords, bool t) {
|
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));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user