diff --git a/misc.h b/misc.h index 6f2b27ed..a4c61350 100644 --- a/misc.h +++ b/misc.h @@ -755,36 +755,35 @@ template<> inline word64 rotrMod(word64 x, unsigned int y) template<> inline word16 rotlFixed(word16 x, unsigned int y) { assert(y < 8*sizeof(x)); - return y ? _rotl16(x, y) : x; + return static_cast(y ? _rotl16(x, y) : x); } template<> inline word16 rotrFixed(word16 x, unsigned int y) { assert(y < 8*sizeof(x)); - assert(y <= 255); - return y ? _rotr16(x, y) : x; + return static_cast(y ? _rotr16(x, y) : x); } template<> inline word16 rotlVariable(word16 x, unsigned int y) { assert(y < 8*sizeof(x)); - return _rotl16(x, y); + return static_cast(_rotl16(x, y)); } template<> inline word16 rotrVariable(word16 x, unsigned int y) { assert(y < 8*sizeof(x)); - return _rotr16(x, y); + return static_cast(_rotr16(x, y)); } template<> inline word16 rotlMod(word16 x, unsigned int y) { - return _rotl16(x, y); + return static_cast(_rotl16(x, y)); } template<> inline word16 rotrMod(word16 x, unsigned int y) { - return _rotr16(x, y); + return static_cast(_rotr16(x, y)); } template<> inline byte rotlFixed(byte x, unsigned int y)