set n based on array length instead of incrementing repeatedly

This commit is contained in:
Matt Jaffee 2017-05-30 16:09:02 -05:00
parent c4fccc025c
commit 56ba127210

View file

@ -1313,10 +1313,10 @@ func intersectArrayArray(a, b *container) *container {
j++
} else {
output.array = append(output.array, va)
output.n++
i, j = i+1, j+1
}
}
output.n = len(output.array)
return output
}