From 4d18c5e4ca6d8c3be910243150a3abdf050629be Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sun, 19 Jun 2005 06:37:28 +0000 Subject: [PATCH] Classes with virtual functions need virtual dtors. --- stepmania/src/crypto51/cryptlib.h | 2 ++ stepmania/src/crypto51/nbtheory.h | 1 + stepmania/src/crypto51/pubkey.h | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/stepmania/src/crypto51/cryptlib.h b/stepmania/src/crypto51/cryptlib.h index dd30f6432f..987ba97001 100644 --- a/stepmania/src/crypto51/cryptlib.h +++ b/stepmania/src/crypto51/cryptlib.h @@ -331,6 +331,7 @@ public: class SimpleKeyingInterface { public: + virtual ~SimpleKeyingInterface() { } //! returns smallest valid key length in bytes */ virtual unsigned int MinKeyLength() const =0; //! returns largest valid key length in bytes */ @@ -632,6 +633,7 @@ class WaitObjectContainer; class Waitable { public: + virtual ~Waitable() { } //! maximum number of wait objects that this object can return virtual unsigned int GetMaxWaitObjectCount() const =0; //! put wait objects into container diff --git a/stepmania/src/crypto51/nbtheory.h b/stepmania/src/crypto51/nbtheory.h index 21a9e2d1db..52ae6e89f9 100644 --- a/stepmania/src/crypto51/nbtheory.h +++ b/stepmania/src/crypto51/nbtheory.h @@ -44,6 +44,7 @@ bool VerifyPrime(RandomNumberGenerator &rng, const Integer &p, unsigned int leve class PrimeSelector { public: + virtual ~PrimeSelector() {} const PrimeSelector *GetSelectorPointer() const {return this;} virtual bool IsAcceptable(const Integer &candidate) const =0; }; diff --git a/stepmania/src/crypto51/pubkey.h b/stepmania/src/crypto51/pubkey.h index 5bb3cadbca..4c08bab004 100644 --- a/stepmania/src/crypto51/pubkey.h +++ b/stepmania/src/crypto51/pubkey.h @@ -109,6 +109,8 @@ public: template class TF_Base { +public: + virtual ~TF_Base() {} protected: virtual const TrapdoorFunctionBounds & GetTrapdoorFunctionBounds() const =0; @@ -314,6 +316,7 @@ template class PublicKeyCopier { public: + virtual ~PublicKeyCopier() {} virtual void CopyKeyInto(typename KEYS::PublicKey &key) const =0; }; @@ -322,6 +325,7 @@ template class PrivateKeyCopier { public: + virtual ~PrivateKeyCopier() {} virtual void CopyKeyInto(typename KEYS::PublicKey &key) const =0; virtual void CopyKeyInto(typename KEYS::PrivateKey &key) const =0; };