From 91b884686c6db1e0022da3fa3b5b559276574f93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <foss@grueninger.de>
Date: Tue, 2 Oct 2018 22:38:50 +0200
Subject: [PATCH] Add virtual destructors to Dumux::Vtk::Field and
 Dumux::NewtonSolver

This fixes a delete-non-virtual-dtor warning from Clang.
---
 dumux/io/vtkfunction.hh         | 2 ++
 dumux/nonlinear/newtonsolver.hh | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/dumux/io/vtkfunction.hh b/dumux/io/vtkfunction.hh
index e5fc35902c..9a71e100dc 100644
--- a/dumux/io/vtkfunction.hh
+++ b/dumux/io/vtkfunction.hh
@@ -260,6 +260,8 @@ public:
             DUNE_THROW(Dune::NotImplemented, "Only element or vertex quantities allowed.");
     }
 
+    virtual ~Field() {}
+
     //! return the name of this field
     virtual std::string name () const { return field_->name(); }
 
diff --git a/dumux/nonlinear/newtonsolver.hh b/dumux/nonlinear/newtonsolver.hh
index f2310aaa0e..2045279df5 100644
--- a/dumux/nonlinear/newtonsolver.hh
+++ b/dumux/nonlinear/newtonsolver.hh
@@ -110,6 +110,8 @@ public:
             partialReassembler_ = std::make_unique<Reassembler>(*assembler_);
     }
 
+    virtual ~NewtonSolver() {}
+
     //! the communicator for parallel runs
     const Communication& comm() const
     { return comm_; }
-- 
GitLab