From 3570ec7ab633e3ae6d29fd944b8d2d81959e533f Mon Sep 17 00:00:00 2001 From: Richard Artoul Date: Fri, 30 Nov 2018 14:41:30 -0500 Subject: [PATCH] collapse next calls into conditonals --- roaring/roaring.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/roaring/roaring.go b/roaring/roaring.go index 4aed09141..be6010b52 100644 --- a/roaring/roaring.go +++ b/roaring/roaring.go @@ -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,