We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aec9bd4 commit 0705c24Copy full SHA for 0705c24
roaring.go
@@ -819,6 +819,9 @@ func (rb *Bitmap) Maximum() uint32 {
819
820
// Contains returns true if the integer is contained in the bitmap
821
func (rb *Bitmap) Contains(x uint32) bool {
822
+ if rb.IsEmpty() {
823
+ return false
824
+ }
825
hb := highbits(x)
826
c := rb.highlowcontainer.getContainer(hb)
827
return c != nil && c.contains(lowbits(x))
roaring64/roaring64.go
@@ -313,6 +313,9 @@ func (rb *Bitmap) Maximum() uint64 {
313
314
315
func (rb *Bitmap) Contains(x uint64) bool {
316
317
318
319
320
321
return c != nil && c.Contains(lowbits(x))
0 commit comments