From: David Wells Date: Mon, 18 May 2020 17:25:59 +0000 (-0400) Subject: Add some virtual dtors. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=279b75a733d435c2c939e78aba9fc306c05d0cbc;p=code-gallery.git Add some virtual dtors. GCC warns about this since the class has a virtual function. --- diff --git a/MCMC-Laplace/mcmc-laplace.cc b/MCMC-Laplace/mcmc-laplace.cc index bda3c2d..ef84546 100644 --- a/MCMC-Laplace/mcmc-laplace.cc +++ b/MCMC-Laplace/mcmc-laplace.cc @@ -72,6 +72,8 @@ namespace ForwardSimulator { public: virtual Vector evaluate(const Vector &coefficients) = 0; + + virtual ~Interface() = default; }; @@ -406,6 +408,8 @@ namespace LogLikelihood { public: virtual double log_likelihood(const Vector &x) const = 0; + + virtual ~Interface() = default; }; @@ -454,6 +458,8 @@ namespace LogPrior { public: virtual double log_prior(const Vector &x) const = 0; + + virtual ~Interface() = default; }; @@ -522,6 +528,8 @@ namespace ProposalGenerator virtual std::pair,double> perturb(const Vector ¤t_sample) const = 0; + + virtual ~Interface() = default; };