From 176bc81e0aa77c8862007db571963652e8d4c94f Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Tue, 14 Apr 2020 12:04:21 +0200
Subject: [PATCH] [vtkfunction] Mark interfaces as final to allow overload
 check and not allow inheritance

---
 dumux/io/vtkfunction.hh | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/dumux/io/vtkfunction.hh b/dumux/io/vtkfunction.hh
index 7a1c88044f..0221c1f1d4 100644
--- a/dumux/io/vtkfunction.hh
+++ b/dumux/io/vtkfunction.hh
@@ -72,18 +72,18 @@ struct VectorP0VTKFunction : Dune::VTKFunction<GridView>
 public:
 
     //! return number of components
-    virtual int ncomps() const { return nComps_; }
+    int ncomps() const final { return nComps_; }
 
     //! get name
-    virtual std::string name() const { return name_; }
+    std::string name() const final { return name_; }
 
     //! evaluate
-    virtual double evaluate(int mycomp, const Element& e, const Dune::FieldVector<ctype, dim>&) const
+    double evaluate(int mycomp, const Element& e, const Dune::FieldVector<ctype, dim>&) const final
     { return Impl::accessEntry(field_, mycomp, mapper_.index(e)); }
 
 #if DUNE_VERSION_GTE(DUNE_GRID, 2, 7)
     //! get output precision for the field
-    Dumux::Vtk::Precision precision() const override
+    Dumux::Vtk::Precision precision() const final
     { return precision_; }
 #endif
 
@@ -127,13 +127,13 @@ struct VectorP1VTKFunction : Dune::VTKFunction<GridView>
 public:
 
     //! return number of components
-    virtual int ncomps() const { return nComps_; }
+    int ncomps() const final { return nComps_; }
 
     //! get name
-    virtual std::string name() const { return name_; }
+    std::string name() const final { return name_; }
 
     //! evaluate
-    virtual double evaluate(int mycomp, const Element& e, const Dune::FieldVector<ctype, dim>& xi) const
+    double evaluate(int mycomp, const Element& e, const Dune::FieldVector<ctype, dim>& xi) const final
     {
         const unsigned int dim = Element::mydimension;
         const unsigned int nVertices = e.subEntities(dim);
@@ -149,7 +149,7 @@ public:
 
 #if DUNE_VERSION_GTE(DUNE_GRID, 2, 7)
     //! get output precision for the field
-    Dumux::Vtk::Precision precision() const override
+    Dumux::Vtk::Precision precision() const final
     { return precision_; }
 #endif
 
@@ -197,13 +197,13 @@ struct VectorP1NonConformingVTKFunction : Dune::VTKFunction<GridView>
 public:
 
     //! return number of components
-    virtual int ncomps() const { return nComps_; }
+    int ncomps() const final { return nComps_; }
 
     //! get name
-    virtual std::string name() const { return name_; }
+    std::string name() const final { return name_; }
 
     //! evaluate
-    virtual double evaluate(int mycomp, const Element& e, const Dune::FieldVector<ctype, dim>& xi) const
+    double evaluate(int mycomp, const Element& e, const Dune::FieldVector<ctype, dim>& xi) const final
     {
         const unsigned int dim = Element::mydimension;
         const unsigned int nVertices = e.subEntities(dim);
@@ -219,7 +219,7 @@ public:
 
 #if DUNE_VERSION_GTE(DUNE_GRID, 2, 7)
     //! get output precision for the field
-    Dumux::Vtk::Precision precision() const override
+    Dumux::Vtk::Precision precision() const final
     { return precision_; }
 #endif
 
-- 
GitLab