From cf5f9f9a57f100ea5cc7a4bc83f7b8a6c821d4c6 Mon Sep 17 00:00:00 2001 From: Seebs Date: Fri, 15 Mar 2019 11:19:49 -0500 Subject: [PATCH] add clarifying comment --- roaring/roaring.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roaring/roaring.go b/roaring/roaring.go index 47b743f22..157203c41 100644 --- a/roaring/roaring.go +++ b/roaring/roaring.go @@ -1773,6 +1773,9 @@ func (c *Container) optimize() { } } +// unionInPlace does not necessarily preserve container's N; it's expected +// to be used when running a sequence of unions, after which you should +// call Repair(). (As of this writing, that only matters for bitmaps.) func (c *Container) unionInPlace(other *Container) { switch c.containerType { case containerBitmap: