mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-20 02:47:11 +03:00
Merge branch 'develop' into wip-cppcheck271-part2
This commit is contained in:
@@ -64,7 +64,7 @@ public:
|
||||
assert(none());
|
||||
}
|
||||
|
||||
bitfield(const boost::dynamic_bitset<> &a) : bits{{0}} {
|
||||
explicit bitfield(const boost::dynamic_bitset<> &a) : bits{{0}} {
|
||||
assert(a.size() == requested_size);
|
||||
assert(none());
|
||||
for (auto i = a.find_first(); i != a.npos; i = a.find_next(i)) {
|
||||
@@ -89,9 +89,7 @@ public:
|
||||
|
||||
/// Set all bits.
|
||||
void setall() {
|
||||
for (auto &e : bits) {
|
||||
e = all_ones;
|
||||
}
|
||||
std::fill(bits.begin(), bits.end(), all_ones);
|
||||
clear_trailer();
|
||||
}
|
||||
|
||||
@@ -102,9 +100,7 @@ public:
|
||||
|
||||
/// Clear all bits.
|
||||
void clear() {
|
||||
for (auto &e : bits) {
|
||||
e = 0;
|
||||
}
|
||||
std::fill(bits.begin(), bits.end(), 0);
|
||||
}
|
||||
|
||||
/// Clear all bits (alias for bitset::clear).
|
||||
|
||||
Reference in New Issue
Block a user