From 7de0e5dc03d2e817f8e5d1882f53de581ada6d11 Mon Sep 17 00:00:00 2001
From: Max Kahnt <max.kahnt@fu-berlin.de>
Date: Fri, 19 Feb 2016 15:14:28 +0100
Subject: [PATCH] Fix overloaded virtual warnings.

---
 dune/solvers/iterationsteps/cgstep.hh              | 5 ++++-
 dune/solvers/iterationsteps/lineariterationstep.hh | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dune/solvers/iterationsteps/cgstep.hh b/dune/solvers/iterationsteps/cgstep.hh
index d05854f9..14b63ef6 100644
--- a/dune/solvers/iterationsteps/cgstep.hh
+++ b/dune/solvers/iterationsteps/cgstep.hh
@@ -39,7 +39,7 @@ namespace Dune {
             virtual void setProblem(const MatrixType& mat, VectorType& x, const VectorType& rhs)
             {
                 matrix_ = stackobject_to_shared_ptr(mat);
-                x_ = &x;
+                setProblem(x);
                 r_ = rhs;
             }
 
@@ -56,8 +56,11 @@ namespace Dune {
             std::shared_ptr<const MatrixType> matrix_;
             double r_squared_old_;
             Preconditioner<MatrixType, VectorType>* preconditioner_;
+
+            using Base::setProblem;
         };
 
+
 #include "cgstep.cc"
     }
 }
diff --git a/dune/solvers/iterationsteps/lineariterationstep.hh b/dune/solvers/iterationsteps/lineariterationstep.hh
index 479e84ea..a9d1e8c2 100644
--- a/dune/solvers/iterationsteps/lineariterationstep.hh
+++ b/dune/solvers/iterationsteps/lineariterationstep.hh
@@ -35,7 +35,7 @@ public:
 
     //! Set linear operator, solution and right hand side
     virtual void setProblem(const MatrixType& mat, VectorType& x, const VectorType& rhs) {
-        this->x_ = &x;
+        setProblem(x);
         rhs_     = &rhs;
         setMatrix(mat);
     }
@@ -86,6 +86,9 @@ public:
     //! The linear operator
     std::shared_ptr<const MatrixType> mat_;
 
+private:
+    using Base = IterationStep<VectorType, BitVectorType>;
+    using Base::setProblem;
 };
 
 #endif
-- 
GitLab