]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix two warnings in the test suite. 16280/head
authorDavid Wells <drwells@email.unc.edu>
Sun, 19 Nov 2023 22:04:57 +0000 (17:04 -0500)
committerDavid Wells <drwells@email.unc.edu>
Sun, 19 Nov 2023 22:04:57 +0000 (17:04 -0500)
These don't compile for me with -Werror.

tests/lac/tensor_product_matrix_08.cc
tests/multigrid/constrained_dofs_05.cc

index 250b0c899616dd27cfd984a3a95f32bcc0e3577c..fbb41b2b8669222879d7a38d98326f4270b1cbe0 100644 (file)
@@ -204,7 +204,7 @@ do_test()
     std::tuple<unsigned int, bool, bool>{0, false, true} // deformed hyper-cube
   };
 
-  for (const auto setting : settings)
+  for (const auto &setting : settings)
     {
       Triangulation<dim> tria;
 
index b6fab7929fc112c9c6b65a669689f6fac339dfe8..16849b7c67e0aacb881b1864802fde0abaae27b3 100644 (file)
@@ -95,7 +95,7 @@ check()
 
       // Print faces that connect to coarser DoF
       deallog << "  Faces neighboring coarser cells:" << std::endl;
-      for (const auto level_cell : dof_handler.cell_iterators_on_level(level))
+      for (const auto &level_cell : dof_handler.cell_iterators_on_level(level))
         {
           // Iterate over all faces
           for (const unsigned int i_face : GeometryInfo<dim>::face_indices())
@@ -128,7 +128,7 @@ check()
       // Print faces that have periodic neighbors
       deallog << "  Faces having periodic neighbors of same level:"
               << std::endl;
-      for (const auto level_cell : dof_handler.cell_iterators_on_level(level))
+      for (const auto &level_cell : dof_handler.cell_iterators_on_level(level))
         {
           // Iterate over all faces
           for (const unsigned int i_face : GeometryInfo<dim>::face_indices())

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.