Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bitwise operations promote the cast to uint16_t to int. So to be consistent, first cast to uint to keep unsignedness and prevent implicit promotion. Then cast back to uint16_t after all bitwise operations are completed. This prevents compiler warnings, unneccessary casts and in the case of right shifting (not the case here) unexpected behaviour.
- Loading branch information