LshiftUint64 returns a << b with an integer overflow check.
(a, b uint64)
| 211 | // LshiftUint64 returns a << b |
| 212 | // with an integer overflow check. |
| 213 | func LshiftUint64(a, b uint64) (result uint64, ok bool) { |
| 214 | if b >= 64 { |
| 215 | return 0, false |
| 216 | } |
| 217 | if a > math.MaxUint64>>uint(b) { |
| 218 | return 0, false |
| 219 | } |
| 220 | return a << uint(b), true |
| 221 | } |
| 222 | |
| 223 | // AddUint32 returns a + b |
| 224 | // with an integer overflow check. |
nothing calls this directly
no outgoing calls
no test coverage detected