diff options
author | git <[email protected]> | 2015-04-08 04:04:55 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2015-04-08 04:04:55 +0000 |
commit | 62947773cedb0c9534c5df91271db9a9414e6e2a (patch) | |
tree | b1a891aca42784136ed58e0d0b90c81159caf0f6 /src/lib/modes/xts/xts.cpp | |
parent | 4eccc8f01e9ce6ce72b90731dc72cb30d383f0aa (diff) |
Fix code that triggers a strange MSVC 'performance warning'
Github pull 74 from Chris Desjardins
Diffstat (limited to 'src/lib/modes/xts/xts.cpp')
-rw-r--r-- | src/lib/modes/xts/xts.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<u64bit>(in, 0); u64bit X1 = load_le<u64bit>(in, 1); - const bool carry = static_cast<bool>(X1 >> 63); + const bool carry = static_cast<bool>((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<u64bit>(in, 0); - const bool carry = static_cast<bool>(X >> 63); + const bool carry = static_cast<bool>((X >> 63) != 0); X <<= 1; if(carry) X ^= 0x1B; |