Cleared virtual destructor warning by explicitly adding them

pull/35/head
Jeffrey Walton 2015-07-17 10:38:44 -04:00
parent b435ce07c8
commit ca6a93bbc5
7 changed files with 17 additions and 0 deletions

2
ec2n.h
View File

@ -100,6 +100,8 @@ public:
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;}

2
ecp.h
View File

@ -109,6 +109,8 @@ public:
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)
{

View File

@ -44,6 +44,7 @@ public:
typedef T Element;
DL_FixedBasePrecomputationImpl() : m_windowSize(0) {}
virtual ~DL_FixedBasePrecomputationImpl() { }
// DL_FixedBasePrecomputation
bool IsInitialized() const

View File

@ -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);

6
luc.h
View File

@ -119,6 +119,8 @@ public:
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;}
@ -142,6 +144,8 @@ public:
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;
};
@ -158,6 +162,8 @@ public:
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
{

View File

@ -21,6 +21,8 @@ public:
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();}

View File

@ -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;
};