parameters use bitset for mark_unsaved

This commit is contained in:
Daniel Agar
2021-12-24 14:32:40 -05:00
parent 0e0639a5bf
commit 38731662c6
9 changed files with 67 additions and 65 deletions
+8
View File
@@ -76,6 +76,14 @@ public:
}
}
void reset()
{
// set bits to false
for (auto &d : _data) {
d = 0;
}
}
private:
static constexpr uint8_t BITS_PER_ELEMENT = 8;
static constexpr size_t ARRAY_SIZE = (N % BITS_PER_ELEMENT == 0) ? N / BITS_PER_ELEMENT : N / BITS_PER_ELEMENT + 1;