From 62947773cedb0c9534c5df91271db9a9414e6e2a Mon Sep 17 00:00:00 2001 From: git Date: Wed, 8 Apr 2015 04:04:55 +0000 Subject: Fix code that triggers a strange MSVC 'performance warning' Github pull 74 from Chris Desjardins --- src/lib/modes/xts/xts.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/modes/xts') diff --git a/src/lib/modes/xts/xts.cpp b/src/lib/modes/xts/xts.cpp index 440d76ec2..b2b8386bb 100644 --- a/src/lib/modes/xts/xts.cpp +++ b/src/lib/modes/xts/xts.cpp @@ -19,7 +19,7 @@ void poly_double_128(byte out[], const byte in[]) u64bit X0 = load_le(in, 0); u64bit X1 = load_le(in, 1); - const bool carry = static_cast(X1 >> 63); + const bool carry = static_cast((X1 >> 63) != 0); X1 = (X1 << 1) | (X0 >> 63); X0 = (X0 << 1); @@ -33,7 +33,7 @@ void poly_double_128(byte out[], const byte in[]) void poly_double_64(byte out[], const byte in[]) { u64bit X = load_le(in, 0); - const bool carry = static_cast(X >> 63); + const bool carry = static_cast((X >> 63) != 0); X <<= 1; if(carry) X ^= 0x1B; -- cgit v1.2.3