mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
Bloom filter changes: address review feedback
This are minor stylistic changes requested in GH-2085.
This commit is contained in:
parent
a34a597e4c
commit
b61fe59f9f
2 changed files with 3 additions and 9 deletions
|
@ -722,14 +722,6 @@ BloomFilterValPtr BloomFilterVal::Intersect(const BloomFilterVal* x, const Bloom
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto final_type = x->Type() ? x->Type() : y->Type();
|
|
||||||
|
|
||||||
if ( typeid(*x->bloom_filter) != typeid(*y->bloom_filter) )
|
|
||||||
{
|
|
||||||
reporter->Error("cannot merge different Bloom filter types");
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( typeid(*x->bloom_filter) != typeid(*y->bloom_filter) )
|
if ( typeid(*x->bloom_filter) != typeid(*y->bloom_filter) )
|
||||||
{
|
{
|
||||||
reporter->Error("cannot intersect different Bloom filter types");
|
reporter->Error("cannot intersect different Bloom filter types");
|
||||||
|
@ -744,6 +736,8 @@ BloomFilterValPtr BloomFilterVal::Intersect(const BloomFilterVal* x, const Bloom
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto final_type = x->Type() ? x->Type() : y->Type();
|
||||||
|
|
||||||
auto intersected = make_intrusive<BloomFilterVal>(intersected_bf);
|
auto intersected = make_intrusive<BloomFilterVal>(intersected_bf);
|
||||||
|
|
||||||
if ( final_type && ! intersected->Typify(final_type) )
|
if ( final_type && ! intersected->Typify(final_type) )
|
||||||
|
|
|
@ -160,7 +160,7 @@ function bloomfilter_add%(bf: opaque of bloomfilter, x: any%): any
|
||||||
|
|
||||||
## Decrements the counter for an element that was added to a counting bloom filter in the past.
|
## Decrements the counter for an element that was added to a counting bloom filter in the past.
|
||||||
##
|
##
|
||||||
## Note that decrement operations can use to false negatives if used on a counting bloom-filter
|
## Note that decrement operations can lead to false negatives if used on a counting bloom-filter
|
||||||
## that exceeded the width of its counter.
|
## that exceeded the width of its counter.
|
||||||
##
|
##
|
||||||
## bf: The coubting bloom filter handle.
|
## bf: The coubting bloom filter handle.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue