normalizeCapacity rounds capacity to the next power of 2.
(capacity uint32)
| 313 | |
| 314 | // normalizeCapacity rounds capacity to the next power of 2. |
| 315 | func normalizeCapacity(capacity uint32) uint32 { |
| 316 | return uint32(1) << min(bits.Len32(capacity-1), 31) |
| 317 | } |
| 318 | |
| 319 | // New constructs a new Map with the specified initial capacity. If |
| 320 | // initialCapacity is 0 the map will start out with zero capacity and will |
no outgoing calls
no test coverage detected
searching dependent graphs…