Use UINT_MAX/DWORD_MAX/DWORD_ERROR when it makes sense to do so.
Use conversion constructors to work-around confusing AStyle styling.
Use a bitcheck instead of casting (WIP).

Fixes CID #965944.