diff options
author | Jeffrey Walton <noloader@gmail.com> | 2017-08-20 07:15:02 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2017-08-20 07:15:02 -0400 |
commit | 3db6f361d20d777ce87434a9fd3c0e3500601ebf (patch) | |
tree | 3f10a2b6ac48ff26f3953448b8bb35aaafea6bba /validat1.cpp | |
parent | 40d0710d43bbd134b695b44c73d05e208344f0fe (diff) | |
download | cryptopp-git-3db6f361d20d777ce87434a9fd3c0e3500601ebf.tar.gz |
Fix compile under MSVC
(ClCompile target) ->
validat1.cpp(1081): warning C4800: 'CryptoPP::word32' : forcing value to bool
'true' or 'false' (performance warning) [c:\Users\cryptopp\cryptest.vcxproj]
validat1.cpp(1090): warning C4800: 'CryptoPP::word32' : forcing value to bool
'true' or 'false' (performance warning) [c:\Users\cryptopp\cryptest.vcxproj]
validat1.cpp(1099): warning C4800: 'CryptoPP::word32' : forcing value to bool
'true' or 'false' (performance warning) [c:\Users\cryptopp\cryptest.vcxproj]
Diffstat (limited to 'validat1.cpp')
-rw-r--r-- | validat1.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/validat1.cpp b/validat1.cpp index fdeaaaed..5bd050ca 100644 --- a/validat1.cpp +++ b/validat1.cpp @@ -1078,7 +1078,7 @@ bool TestMersenne() std::cout << " VIA RNG is activated\n";
// Bit 13 should be unset
- fail = (msr & (1 << 13U));
+ fail = !!(msr & (1 << 13U));
pass &= !fail;
if (fail)
std::cout << "FAILED:";
@@ -1087,7 +1087,7 @@ bool TestMersenne() std::cout << " von Neumann corrector is activated\n";
// Bit 14 should be unset
- fail = (msr & (1 << 14U));
+ fail = !!(msr & (1 << 14U));
pass &= !fail;
if (fail)
std::cout << "FAILED:";
@@ -1096,7 +1096,7 @@ bool TestMersenne() std::cout << " String filter is deactivated\n";
// Bit 12:10 should be unset
- fail = (msr & (0x7 << 10U));
+ fail = !!(msr & (0x7 << 10U));
pass &= !fail;
if (fail)
std::cout << "FAILED:";
|