Skip to content

Commit

Permalink
fix: trim some dead comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Jun 7, 2024
1 parent e18a7ce commit 66e4396
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 14 deletions.
1 change: 0 additions & 1 deletion arraycontainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ func (ac *arrayContainer) ior(a container) container {
return ac.iorArray(x)
case *bitmapContainer:
return a.(*bitmapContainer).orArray(ac)
// return ac.iorBitmap(x) // note: this does not make sense
case *runContainer16:
if x.isFull() {
return x.clone()
Expand Down
5 changes: 2 additions & 3 deletions bitmapcontainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,10 @@ func (bc *bitmapContainer) getManyIterator() manyIterable {
}

func (bc *bitmapContainer) getSizeInBytes() int {
return len(bc.bitmap) * 8 // + bcBaseBytes
return len(bc.bitmap) * 8
}

func (bc *bitmapContainer) serializedSizeInBytes() int {
// return bc.Msgsize()// NOO! This breaks GetSerializedSizeInBytes
return len(bc.bitmap) * 8
}

Expand Down Expand Up @@ -820,7 +819,7 @@ func (bc *bitmapContainer) andBitmap(value2 *bitmapContainer) container {
}
ac := newArrayContainerSize(newcardinality)
fillArrayAND(ac.content, bc.bitmap, value2.bitmap)
ac.content = ac.content[:newcardinality] // not sure why i need this
ac.content = ac.content[:newcardinality]
return ac
}

Expand Down
8 changes: 0 additions & 8 deletions roaring64/roaring64.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,6 @@ func (rb *Bitmap) ReadFrom(stream io.Reader) (p int64, err error) {
return p, nil
}

// FromBuffer creates a bitmap from its serialized version stored in buffer
// func (rb *Bitmap) FromBuffer(data []byte) (p int64, err error) {
//
// // TODO: Add buffer interning as in base roaring package.
// buf := bytes.NewBuffer(data)
// return rb.ReadFrom(buf)
// }

// MarshalBinary implements the encoding.BinaryMarshaler interface for the bitmap
// (same as ToBytes)
func (rb *Bitmap) MarshalBinary() ([]byte, error) {
Expand Down
2 changes: 0 additions & 2 deletions roaringarray.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ type container interface {
iadd(x uint16) bool // inplace, returns true if x was new.
iaddReturnMinimized(uint16) container // may change return type to minimize storage.

// addRange(start, final int) container // range is [firstOfRange,lastOfRange) (unused)
iaddRange(start, endx int) container // i stands for inplace, range is [firstOfRange,endx)

iremove(x uint16) bool // inplace, returns true if x was present.
Expand Down Expand Up @@ -62,7 +61,6 @@ type container interface {
lazyOR(r container) container
lazyIOR(r container) container
getSizeInBytes() int
// removeRange(start, final int) container // range is [firstOfRange,lastOfRange) (unused)
iremoveRange(start, final int) container // i stands for inplace, range is [firstOfRange,lastOfRange)
selectInt(x uint16) int // selectInt returns the xth integer in the container
serializedSizeInBytes() int
Expand Down

0 comments on commit 66e4396

Please sign in to comment.