Skip to content

Commit

Permalink
Cleared virtual destructor warning by explicitly adding them
Browse files Browse the repository at this point in the history
  • Loading branch information
noloader committed Jul 17, 2015
1 parent b435ce0 commit ca6a93b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ec2n.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ template<> class EcPrecomputation<EC2N> : public DL_GroupPrecomputation<EC2N::Po
Element BERDecodeElement(BufferedTransformation &bt) const {return m_ec.BERDecodePoint(bt);}
void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {m_ec.DEREncodePoint(bt, v, false);}

virtual ~EcPrecomputation() { }

// non-inherited
void SetCurve(const EC2N &ec) {m_ec = ec;}
const EC2N & GetCurve() const {return m_ec;}
Expand Down
2 changes: 2 additions & 0 deletions ecp.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ template<> class EcPrecomputation<ECP> : public DL_GroupPrecomputation<ECP::Poin
Element BERDecodeElement(BufferedTransformation &bt) const {return m_ec->BERDecodePoint(bt);}
void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {m_ec->DEREncodePoint(bt, v, false);}

virtual ~EcPrecomputation() { }

// non-inherited
void SetCurve(const ECP &ec)
{
Expand Down
1 change: 1 addition & 0 deletions eprecomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class DL_FixedBasePrecomputationImpl : public DL_FixedBasePrecomputation<T>
typedef T Element;

DL_FixedBasePrecomputationImpl() : m_windowSize(0) {}
virtual ~DL_FixedBasePrecomputationImpl() { }

// DL_FixedBasePrecomputation
bool IsInitialized() const
Expand Down
2 changes: 2 additions & 0 deletions luc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ class LUCPrimeSelector : public PrimeSelector
{
public:
LUCPrimeSelector(const Integer &e) : m_e(e) {}
virtual ~LUCPrimeSelector() { }

bool IsAcceptable(const Integer &candidate) const
{
return RelativelyPrime(m_e, candidate+1) && RelativelyPrime(m_e, candidate-1);
Expand Down
6 changes: 6 additions & 0 deletions luc.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ class DL_GroupPrecomputation_LUC : public DL_GroupPrecomputation<Integer>
Element BERDecodeElement(BufferedTransformation &bt) const {return Integer(bt);}
void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {v.DEREncode(bt);}

virtual ~DL_GroupPrecomputation_LUC() { }

// non-inherited
void SetModulus(const Integer &v) {m_p = v;}
const Integer & GetModulus() const {return m_p;}
Expand All @@ -142,6 +144,8 @@ class DL_BasePrecomputation_LUC : public DL_FixedBasePrecomputation<Integer>
Integer CascadeExponentiate(const DL_GroupPrecomputation<Element> &group, const Integer &exponent, const DL_FixedBasePrecomputation<Integer> &pc2, const Integer &exponent2) const
{throw NotImplemented("DL_BasePrecomputation_LUC: CascadeExponentiate not implemented");} // shouldn't be called

virtual ~DL_BasePrecomputation_LUC() { }

private:
Integer m_g;
};
Expand All @@ -158,6 +162,8 @@ class DL_GroupParameters_LUC : public DL_GroupParameters_IntegerBasedImpl<DL_Gro
Element CascadeExponentiate(const Element &element1, const Integer &exponent1, const Element &element2, const Integer &exponent2) const
{throw NotImplemented("LUC_GroupParameters: MultiplyElements can not be implemented");}

virtual ~DL_GroupParameters_LUC() { }

// NameValuePairs interface
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const
{
Expand Down
2 changes: 2 additions & 0 deletions modexppc.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class ModExpPrecomputation : public DL_GroupPrecomputation<Integer>
Element BERDecodeElement(BufferedTransformation &bt) const {return Integer(bt);}
void DEREncodeElement(BufferedTransformation &bt, const Element &v) const {v.DEREncode(bt);}

virtual ~ModExpPrecomputation() { }

// non-inherited
void SetModulus(const Integer &v) {m_mr.reset(new MontgomeryRepresentation(v));}
const Integer & GetModulus() const {return m_mr->GetModulus();}
Expand Down
2 changes: 2 additions & 0 deletions rsa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ class RSAPrimeSelector : public PrimeSelector
{
public:
RSAPrimeSelector(const Integer &e) : m_e(e) {}
virtual ~RSAPrimeSelector() { }

bool IsAcceptable(const Integer &candidate) const {return RelativelyPrime(m_e, candidate-Integer::One());}
Integer m_e;
};
Expand Down

0 comments on commit ca6a93b

Please sign in to comment.