chore(segmenter): cannot easily use ranges algorithms for bloom filter

This commit is contained in:
Marcus Holland-Moritz 2025-03-16 17:10:23 +01:00
parent e252182171
commit d11a591837

View File

@ -229,12 +229,16 @@ class alignas(64) bloom_filter {
// size in bits // size in bits
DWARFS_FORCE_INLINE size_t size() const { return size_; } DWARFS_FORCE_INLINE size_t size() const { return size_; }
void clear() { std::fill(begin(), end(), 0); } void clear() {
// NOLINTNEXTLINE(modernize-use-ranges)
std::fill(begin(), end(), 0);
}
void merge(bloom_filter const& other) { void merge(bloom_filter const& other) {
if (size() != other.size()) { if (size() != other.size()) {
throw std::runtime_error("size mismatch"); throw std::runtime_error("size mismatch");
} }
// NOLINTNEXTLINE(modernize-use-ranges)
std::transform(cbegin(), cend(), other.cbegin(), begin(), std::bit_or<>{}); std::transform(cbegin(), cend(), other.cbegin(), begin(), std::bit_or<>{});
} }