()
| 52 | } |
| 53 | |
| 54 | func (ba *bitArray) setHighest() { |
| 55 | for i := len(ba.blocks) - 1; i >= 0; i-- { |
| 56 | if ba.blocks[i] == 0 { |
| 57 | continue |
| 58 | } |
| 59 | |
| 60 | pos := ba.blocks[i].findLeftPosition() |
| 61 | ba.highest = (uint64(i) * s) + pos |
| 62 | ba.anyset = true |
| 63 | return |
| 64 | } |
| 65 | |
| 66 | ba.anyset = false |
| 67 | ba.highest = 0 |
| 68 | ba.lowest = 0 |
| 69 | } |
| 70 | |
| 71 | // capacity returns the total capacity of the bit array. |
| 72 | func (ba *bitArray) Capacity() uint64 { |
no test coverage detected