summaryrefslogtreecommitdiff
path: root/modarith.h
diff options
context:
space:
mode:
authorMarcel Raad <MarcelRaad@users.noreply.github.com>2018-05-11 01:59:21 +0200
committerJeffrey Walton <noloader@gmail.com>2018-05-10 19:59:21 -0400
commit7c1d296283fab97a2a5d34445b8c4adca0b9ea0e (patch)
tree9444a3cfe124d3f185c27e331d3a733d5c412dc8 /modarith.h
parenta07a0e5e5f5f9ad8c3533202b6a7cd3a8036f5f4 (diff)
downloadcryptopp-git-7c1d296283fab97a2a5d34445b8c4adca0b9ea0e.tar.gz
Fix clang warnings in headers (#655)
* remove superfluous semicolon * Remove C-style casts from public headers clang warns about them with -Wold-style-cast. It also warns about implicitly casting away const with -Wcast-qual. Fix both by removing unnecessary casts and converting the remaining ones to C++ casts.
Diffstat (limited to 'modarith.h')
-rw-r--r--modarith.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/modarith.h b/modarith.h
index 740e581c..a00582eb 100644
--- a/modarith.h
+++ b/modarith.h
@@ -47,12 +47,12 @@ public:
/// \brief Construct a ModularArithmetic
/// \param modulus congruence class modulus
ModularArithmetic(const Integer &modulus = Integer::One())
- : AbstractRing<Integer>(), m_modulus(modulus), m_result((word)0, modulus.reg.size()) {}
+ : AbstractRing<Integer>(), m_modulus(modulus), m_result(static_cast<word>(0), modulus.reg.size()) {}
/// \brief Copy construct a ModularArithmetic
/// \param ma other ModularArithmetic
ModularArithmetic(const ModularArithmetic &ma)
- : AbstractRing<Integer>(), m_modulus(ma.m_modulus), m_result((word)0, ma.m_modulus.reg.size()) {}
+ : AbstractRing<Integer>(), m_modulus(ma.m_modulus), m_result(static_cast<word>(0), ma.m_modulus.reg.size()) {}
/// \brief Construct a ModularArithmetic
/// \param bt BER encoded ModularArithmetic