summaryrefslogtreecommitdiff
path: root/chacha.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2021-03-09 21:56:24 -0500
committerJeffrey Walton <noloader@gmail.com>2021-03-09 21:56:24 -0500
commitde45ebeec15c8788ab721370e085f6299da06ee4 (patch)
treed4f00307d77daee723cd2f4db1b73a91189603ec /chacha.cpp
parentcb18daa163ec90ac1d5684d1dffee4f89e8eb015 (diff)
downloadcryptopp-git-de45ebeec15c8788ab721370e085f6299da06ee4.tar.gz
Clear C++20 enum-enum conversion warnings (GH #1016)
Diffstat (limited to 'chacha.cpp')
-rw-r--r--chacha.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/chacha.cpp b/chacha.cpp
index 11c8a399..c1b0f559 100644
--- a/chacha.cpp
+++ b/chacha.cpp
@@ -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