fix some GCC 8 warnings

the warnings about catching a polymorphic type by value. I agree that
this should not be done.
This commit is contained in:
Andreas Lauser
2018-09-18 14:03:53 +02:00
parent c765b21917
commit 555bf7ad75
2 changed files with 2 additions and 2 deletions

View File

@@ -130,7 +130,7 @@ public:
// Solve J*x = b
x = 0.0;
try { J.solve(x, b); }
catch (Dune::FMatrixError e)
catch (const Dune::FMatrixError& e)
{ throw Opm::NumericalIssue(e.what()); }
//std::cout << "original delta: " << x << "\n";

View File

@@ -202,7 +202,7 @@ public:
deltaX = 0;
try { J.solve(deltaX, b); }
catch (Dune::FMatrixError e) {
catch (const Dune::FMatrixError& e) {
throw Opm::NumericalIssue(e.what());
}
Valgrind::CheckDefined(deltaX);