mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-05 22:04:27 +08:00
run clang-tidy with readability-braces-around-statements (#2899)
* run clang-tidy with readability-braces-around-statements clang-format the results clean up all the parts that clang-tidy-8 broke * fix problem on windows
This commit is contained in:
@@ -52,7 +52,9 @@ ExplicitBitVect::ExplicitBitVect(const ExplicitBitVect &other)
|
||||
};
|
||||
|
||||
ExplicitBitVect &ExplicitBitVect::operator=(const ExplicitBitVect &other) {
|
||||
if (this == &other) return *this;
|
||||
if (this == &other) {
|
||||
return *this;
|
||||
}
|
||||
d_size = other.d_size;
|
||||
delete dp_bits;
|
||||
dp_bits = new boost::dynamic_bitset<>(*(other.dp_bits));
|
||||
@@ -169,10 +171,14 @@ unsigned int ExplicitBitVect::getNumOffBits() const {
|
||||
// the contents of v are blown out
|
||||
void ExplicitBitVect::getOnBits(IntVect &v) const {
|
||||
unsigned int nOn = getNumOnBits();
|
||||
if (!v.empty()) IntVect().swap(v);
|
||||
if (!v.empty()) {
|
||||
IntVect().swap(v);
|
||||
}
|
||||
v.reserve(nOn);
|
||||
for (unsigned int i = 0; i < d_size; i++) {
|
||||
if ((bool)(*dp_bits)[i]) v.push_back(i);
|
||||
if ((bool)(*dp_bits)[i]) {
|
||||
v.push_back(i);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user