diff --git a/roaring/containers.go b/roaring/containers.go index 102ffd3bd..0e8fdf988 100644 --- a/roaring/containers.go +++ b/roaring/containers.go @@ -156,7 +156,7 @@ func (sc *sliceContainers) Iterator(key uint64) (citer ContainerIterator, found return &sliceIterator{e: sc, i: i}, found } -func (sc *sliceContainers) RepairBitmaps() { +func (sc *sliceContainers) repairBitmaps() { for _, c := range sc.containers { if c.isBitmap() { c.bitmapRepair() diff --git a/roaring/roaring.go b/roaring/roaring.go index 575515743..3cec6cf85 100644 --- a/roaring/roaring.go +++ b/roaring/roaring.go @@ -98,10 +98,6 @@ type Containers interface { Count() uint64 - // RepairBitmaps will repair cardinality(n) values on bitmap containers after - // in-place operations. - RepairBitmaps() - //Reset will clear the containers collection to allow for recycling during snapshot Reset() } @@ -692,7 +688,7 @@ func (b *Bitmap) unionIntoTarget(target *Bitmap, others ...*Bitmap) { // n (container cardinality) to fall out of sync, and then at the very end we perform // a "Repair" to recalculate all the container values. That way we never popcount() // an entire bitmap container more than once per bulk union operation. - target.Containers.RepairBitmaps() + target.Containers.(*sliceContainers).repairBitmaps() } // Difference returns the difference of b and other.