| 23 | } |
| 24 | |
| 25 | inline ui64 ZigZagEncode64(i64 n) |
| 26 | { |
| 27 | // Note: the right-shift must be arithmetic. |
| 28 | // Note: left shift must be unsigned because of overflow. |
| 29 | return (static_cast<ui64>(n) << 1) ^ static_cast<ui64>(n >> 63); |
| 30 | } |
| 31 | |
| 32 | inline i64 ZigZagDecode64(ui64 n) |
| 33 | { |
no outgoing calls
no test coverage detected