From 009c7743f32bf670d02b0b50674f5d30a1349a8c Mon Sep 17 00:00:00 2001 From: Oliver Sander <oliver.sander@tu-dresden.de> Date: Sun, 22 Nov 2020 11:23:45 +0100 Subject: [PATCH] Fix a compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "Catching polymorphic type ‘class Dune::Exception’ by value" --- dune/matrix-vector/test/resizetest.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dune/matrix-vector/test/resizetest.cc b/dune/matrix-vector/test/resizetest.cc index bdb6923..a9ff787 100644 --- a/dune/matrix-vector/test/resizetest.cc +++ b/dune/matrix-vector/test/resizetest.cc @@ -77,7 +77,7 @@ bool checkResize() { FV fv; resize(fv, Dune::FieldVector<int, 5>()); return false; - } catch (Dune::Exception) { + } catch (Dune::Exception&) { // TODO make sure the right exception is thrown } @@ -116,9 +116,9 @@ bool checkResize() { // test "unnatural" matrix types // TODO - } catch (Dune::Exception e) { + } catch (Dune::Exception& e) { std::cout << "FAILURE." << std::endl; - std::cout << e << std::endl; + std::cout << e.what() << std::endl; return false; } -- GitLab