From 7ea5093830fdb0c78c1f301d4a5e59f68cefa13e Mon Sep 17 00:00:00 2001
From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de>
Date: Wed, 25 Jul 2018 16:47:50 +0200
Subject: [PATCH] [newtonsolver] Pass shared_ptr by copy

* won't compile otherwise
---
 dumux/nonlinear/newtonsolver.hh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dumux/nonlinear/newtonsolver.hh b/dumux/nonlinear/newtonsolver.hh
index 0fe594dee6..f2310aaa0e 100644
--- a/dumux/nonlinear/newtonsolver.hh
+++ b/dumux/nonlinear/newtonsolver.hh
@@ -214,7 +214,7 @@ public:
      * \brief Run the Newton method to solve a non-linear system.
      *        The solver is responsible for all the strategic decisions.
      */
-    void solve(SolutionVector& uCurrentIter, std::shared_ptr<ConvergenceWriter>& convWriter = nullptr)
+    void solve(SolutionVector& uCurrentIter, std::shared_ptr<ConvergenceWriter> convWriter = nullptr)
     {
         const bool converged = solve_(uCurrentIter, convWriter);
         if (!converged)
@@ -646,7 +646,7 @@ private:
      * \brief Run the Newton method to solve a non-linear system.
      *        The solver is responsible for all the strategic decisions.
      */
-    bool solve_(SolutionVector& uCurrentIter, std::shared_ptr<ConvergenceWriter>& convWriter = nullptr)
+    bool solve_(SolutionVector& uCurrentIter, std::shared_ptr<ConvergenceWriter> convWriter = nullptr)
     {
         // the given solution is the initial guess
         SolutionVector uLastIter(uCurrentIter);
-- 
GitLab