diff options
author | Tomasz Frydrych <[email protected]> | 2017-04-02 22:24:31 +0200 |
---|---|---|
committer | Tomasz Frydrych <[email protected]> | 2017-04-03 23:42:29 +0200 |
commit | fbef72e11c483fae16c32480cf84253a56d0ee25 (patch) | |
tree | 200b0fe290e9809ef6c8883e886b7c9a48c902a1 /src/lib/math/numbertheory | |
parent | 753b4c2d5301574d3c9390b79aa275a49809e6c8 (diff) |
Content:
* fixes for deprecated constructions in c++11 and later (explicit rule of 3/5 or implicit rule of 0 and other violations)
* `default` specifier instead of `{}` in some places(probably all)
* removal of unreachable code (for example `return` after `throw`)
* removal of compilation unit only visible, but not used functions
* fix for `throw()` specifier - used instead `BOTAN_NOEXCEPT`
* removed not needed semicolons
Diffstat (limited to 'src/lib/math/numbertheory')
-rw-r--r-- | src/lib/math/numbertheory/pow_mod.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/math/numbertheory/pow_mod.h b/src/lib/math/numbertheory/pow_mod.h index 194d00ec8..e7db774b6 100644 --- a/src/lib/math/numbertheory/pow_mod.h +++ b/src/lib/math/numbertheory/pow_mod.h @@ -22,7 +22,11 @@ class BOTAN_DLL Modular_Exponentiator virtual void set_exponent(const BigInt&) = 0; virtual BigInt execute() const = 0; virtual Modular_Exponentiator* copy() const = 0; - virtual ~Modular_Exponentiator() {} + + Modular_Exponentiator() = default; + Modular_Exponentiator(const Modular_Exponentiator&) = default; + Modular_Exponentiator & operator=(const Modular_Exponentiator&) = default; + virtual ~Modular_Exponentiator() = default; }; /** @@ -103,7 +107,7 @@ class BOTAN_DLL Fixed_Exponent_Power_Mod : public Power_Mod BigInt operator()(const BigInt& b) const { set_base(b); return execute(); } - Fixed_Exponent_Power_Mod() {} + Fixed_Exponent_Power_Mod() = default; Fixed_Exponent_Power_Mod(const BigInt& exponent, const BigInt& modulus, @@ -119,7 +123,7 @@ class BOTAN_DLL Fixed_Base_Power_Mod : public Power_Mod BigInt operator()(const BigInt& e) const { set_exponent(e); return execute(); } - Fixed_Base_Power_Mod() {} + Fixed_Base_Power_Mod() = default; Fixed_Base_Power_Mod(const BigInt& base, const BigInt& modulus, |