diff --git a/test/common/functionfromstringexpression/test_functionfromstringexpression.cc b/test/common/functionfromstringexpression/test_functionfromstringexpression.cc index e97865af37d9f3942047517ade83793e3067ad39..9c75c93add0249dd84421f838f28415019355520 100644 --- a/test/common/functionfromstringexpression/test_functionfromstringexpression.cc +++ b/test/common/functionfromstringexpression/test_functionfromstringexpression.cc @@ -70,7 +70,7 @@ int main(int argc, char* argv[]) const std::string funcStr = "foo*sin(bar)*bla"; bool error = false; try { FunctionFromStringExpression<2> func(funcStr, std::array<std::string, 2>{{"foo" "bar"}}); } - catch (Dune::IOError& e) { error = true; } + catch (const Dune::IOError& e) { error = true; } if (!error) DUNE_THROW(Dune::Exception, "Faulty expression did not throw: " << funcStr); } diff --git a/test/common/spline/test_spline.cc b/test/common/spline/test_spline.cc index 30249beeb237ed030bfe2dca1aea8c79bebe46b4..10f8a086f19d0fd23d2348a497c359fe8e299a1a 100644 --- a/test/common/spline/test_spline.cc +++ b/test/common/spline/test_spline.cc @@ -240,8 +240,8 @@ void plot() double y_[] = { 10, 0, 10, 0, 10 }; double m1 = 10; double m2 = -10; - FV &xs = *reinterpret_cast<FV*>(x_); - FV &ys = *reinterpret_cast<FV*>(y_); + const FV &xs = *reinterpret_cast<FV*>(x_); + const FV &ys = *reinterpret_cast<FV*>(y_); Dumux::Spline<double, numSamples> spFull(xs, ys, m1, m2); Dumux::Spline<double, numSamples> spNatural(xs, ys); diff --git a/test/geometry/test_1d2d_intersection.cc b/test/geometry/test_1d2d_intersection.cc index d4cf483f194350337b9e38d21f4453f9b9709500..0deac74958710f914ddb1faf1f73def390d956c9 100644 --- a/test/geometry/test_1d2d_intersection.cc +++ b/test/geometry/test_1d2d_intersection.cc @@ -26,7 +26,7 @@ Dune::MultiLinearGeometry<double, 1, 3> makeLine(std::initializer_list<Dune::FieldVector<double, 2>>&& c, std::integral_constant<int, 3>) { std::vector<Dune::FieldVector<double, 3>> corners; - for (auto& corner : c) + for (const auto& corner : c) { Dune::FieldVector<double, 3> coord; coord[0] = corner[0];