Merge pull request #277 from isildur-g/wip-cppcheck271

phase 1 of addressing cppcheck useStlAlgorithm warnings for fill and copy operations
This commit is contained in:
Konstantinos Margaritis
2024-05-15 10:44:15 +03:00
committed by GitHub
19 changed files with 102 additions and 98 deletions

View File

@@ -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).