From 828c550389f79b035f4518a79b7138d281f0961c Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 13 Jul 2015 23:59:01 -0400 Subject: [PATCH] Cleared C4242 warning uder Visual Studio --- misc.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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)