mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
`a << b` is undefined when `a` is negative, and `a >> b` is implementation-defined. The correct thing to do here is to cast to unsigned, swap the bytes there and then swap back. This also improves performance on some compilers: Clang is smart enough to recognise that we're byteswapping here and reduce it to a single `bswap` instruction on x86_64, but only for the unsigned versions. |
||
|---|---|---|
| .. | ||
| include | ||
| src | ||
| CMakeLists.txt | ||