()
| 347 | } |
| 348 | |
| 349 | func (ba *bitArray) copy() BitArray { |
| 350 | blocks := make(blocks, len(ba.blocks)) |
| 351 | copy(blocks, ba.blocks) |
| 352 | return &bitArray{ |
| 353 | blocks: blocks, |
| 354 | lowest: ba.lowest, |
| 355 | highest: ba.highest, |
| 356 | anyset: ba.anyset, |
| 357 | } |
| 358 | } |
| 359 | |
| 360 | // newBitArray returns a new dense BitArray at the specified size. This is a |
| 361 | // separate private constructor so unit tests don't have to constantly cast the |
no outgoing calls