diff options
author | Jeffrey Walton <noloader@gmail.com> | 2021-03-09 21:56:24 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2021-03-09 21:56:24 -0500 |
commit | de45ebeec15c8788ab721370e085f6299da06ee4 (patch) | |
tree | d4f00307d77daee723cd2f4db1b73a91189603ec /chacha.cpp | |
parent | cb18daa163ec90ac1d5684d1dffee4f89e8eb015 (diff) | |
download | cryptopp-git-de45ebeec15c8788ab721370e085f6299da06ee4.tar.gz |
Clear C++20 enum-enum conversion warnings (GH #1016)
Diffstat (limited to 'chacha.cpp')
-rw-r--r-- | chacha.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -102,7 +102,7 @@ void ChaCha_OperateKeystream(KeystreamOperation operation, {
while (iterationCount >= 8 && MultiBlockSafe(state[12], 8))
{
- const bool xorInput = (operation & INPUT_NULL) != INPUT_NULL;
+ const bool xorInput = (operation & static_cast<int>(INPUT_NULL)) != static_cast<int>(INPUT_NULL);
ChaCha_OperateKeystream_AVX2(state, xorInput ? input : NULLPTR, output, rounds);
// MultiBlockSafe avoids overflow on the counter words
@@ -120,7 +120,7 @@ void ChaCha_OperateKeystream(KeystreamOperation operation, {
while (iterationCount >= 4 && MultiBlockSafe(state[12], 4))
{
- const bool xorInput = (operation & INPUT_NULL) != INPUT_NULL;
+ const bool xorInput = (operation & static_cast<int>(INPUT_NULL)) != static_cast<int>(INPUT_NULL);
ChaCha_OperateKeystream_SSE2(state, xorInput ? input : NULLPTR, output, rounds);
// MultiBlockSafe avoids overflow on the counter words
@@ -138,7 +138,7 @@ void ChaCha_OperateKeystream(KeystreamOperation operation, {
while (iterationCount >= 4 && MultiBlockSafe(state[12], 4))
{
- const bool xorInput = (operation & INPUT_NULL) != INPUT_NULL;
+ const bool xorInput = (operation & static_cast<int>(INPUT_NULL)) != static_cast<int>(INPUT_NULL);
ChaCha_OperateKeystream_NEON(state, xorInput ? input : NULLPTR, output, rounds);
// MultiBlockSafe avoids overflow on the counter words
@@ -156,7 +156,7 @@ void ChaCha_OperateKeystream(KeystreamOperation operation, {
while (iterationCount >= 4 && MultiBlockSafe(state[12], 4))
{
- const bool xorInput = (operation & INPUT_NULL) != INPUT_NULL;
+ const bool xorInput = (operation & static_cast<int>(INPUT_NULL)) != static_cast<int>(INPUT_NULL);
ChaCha_OperateKeystream_ALTIVEC(state, xorInput ? input : NULLPTR, output, rounds);
// MultiBlockSafe avoids overflow on the counter words
|