summaryrefslogtreecommitdiff
path: root/validat1.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-09-05 12:23:12 -0400
committerJeffrey Walton <noloader@gmail.com>2017-09-05 12:23:12 -0400
commit23b939c62b7f497d6f99bfe97ad639b35287ac61 (patch)
treedabc1760baed387cabe52634c3db429b9a833241 /validat1.cpp
parentb0f3b8ce1761e7ab9a3ead46fb7403fb38dd3723 (diff)
downloadcryptopp-git-23b939c62b7f497d6f99bfe97ad639b35287ac61.tar.gz
Clear warnings under GCC with -Wall -Wextra
Diffstat (limited to 'validat1.cpp')
-rw-r--r--validat1.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/validat1.cpp b/validat1.cpp
index 9990c19e..62fa4b67 100644
--- a/validat1.cpp
+++ b/validat1.cpp
@@ -1909,8 +1909,10 @@ public:
template <class E, class D> class FixedRoundsCipherFactory : public CipherFactory
{
public:
- FixedRoundsCipherFactory(unsigned int keylen=0) : m_keylen(keylen?keylen:E::DEFAULT_KEYLENGTH) {}
- unsigned int BlockSize() const {return E::BLOCKSIZE;}
+ FixedRoundsCipherFactory(unsigned int keylen=0) :
+ m_keylen(keylen ? keylen : static_cast<unsigned int>(E::DEFAULT_KEYLENGTH)) {}
+
+ unsigned int BlockSize() const {return static_cast<unsigned int>(E::BLOCKSIZE);}
unsigned int KeyLength() const {return m_keylen;}
BlockTransformation* NewEncryption(const byte *keyStr) const
@@ -1924,9 +1926,11 @@ public:
template <class E, class D> class VariableRoundsCipherFactory : public CipherFactory
{
public:
- VariableRoundsCipherFactory(unsigned int keylen=0, unsigned int rounds=0)
- : m_keylen(keylen ? keylen : E::DEFAULT_KEYLENGTH), m_rounds(rounds ? rounds : E::DEFAULT_ROUNDS) {}
- unsigned int BlockSize() const {return E::BLOCKSIZE;}
+ VariableRoundsCipherFactory(unsigned int keylen=0, unsigned int rounds=0) :
+ m_keylen(keylen ? keylen : static_cast<unsigned int>(E::DEFAULT_KEYLENGTH)),
+ m_rounds(rounds ? rounds : static_cast<unsigned int>(E::DEFAULT_ROUNDS)) {}
+
+ unsigned int BlockSize() const {return static_cast<unsigned int>(E::BLOCKSIZE);}
unsigned int KeyLength() const {return m_keylen;}
BlockTransformation* NewEncryption(const byte *keyStr) const