mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-09 04:17:51 +00:00
collapse next calls into conditonals
This commit is contained in:
parent
531b9d616d
commit
3570ec7ab6
1 changed files with 2 additions and 4 deletions
|
|
@ -563,8 +563,7 @@ func (b *Bitmap) unionIntoTarget(target *Bitmap, others ...*Bitmap) {
|
|||
// a wasteful self union.
|
||||
if b != target {
|
||||
bIter, _ := b.Containers.Iterator(0)
|
||||
next := bIter.Next()
|
||||
if next {
|
||||
if bIter.Next() {
|
||||
bitmapIters = append(bitmapIters, handledIter{
|
||||
iter: bIter,
|
||||
hasNext: true,
|
||||
|
|
@ -575,8 +574,7 @@ func (b *Bitmap) unionIntoTarget(target *Bitmap, others ...*Bitmap) {
|
|||
|
||||
for _, other := range others {
|
||||
otherIter, _ := other.Containers.Iterator(0)
|
||||
next := otherIter.Next()
|
||||
if next {
|
||||
if otherIter.Next() {
|
||||
bitmapIters = append(bitmapIters, handledIter{
|
||||
iter: otherIter,
|
||||
hasNext: true,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue