]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make a couple of loop variables 'const'. 16126/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 11 Oct 2023 16:23:31 +0000 (10:23 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 11 Oct 2023 16:23:31 +0000 (10:23 -0600)
tests/matrix_free/point_evaluation_27.cc
tests/non_matching/mapping_info_03.cc

index 06c39a2cbaf18a98b42b134659a6c1e5c0dcfa0e..1d37406611e6c50f680af7e30de99d60812742e3 100644 (file)
@@ -93,7 +93,7 @@ test(const FiniteElement<dim> &fe)
 
   fe_point_eval.evaluate(buffer, EvaluationFlags::values);
 
-  for (unsigned int q : fe_point_eval.quadrature_point_indices())
+  for (const unsigned int q : fe_point_eval.quadrature_point_indices())
     {
       deallog << "Value at q " << q << ": " << fe_point_eval.get_value(q)
               << std::endl;
index 795bad9a17b32266d221772cfb479ca6a778bbdd..ecce07850360aab276fc2de55e1c3471013184ab 100644 (file)
@@ -87,7 +87,8 @@ test()
         for (auto f : cell->face_indices())
           {
             fe_point_eval.reinit(cell->active_cell_index(), f);
-            for (unsigned int q : fe_point_eval.quadrature_point_indices())
+            for (const unsigned int q :
+                 fe_point_eval.quadrature_point_indices())
               deallog << fe_point_eval.JxW(q) << std::endl;
           }
       }
@@ -123,7 +124,7 @@ test()
     for (const auto &cell : tria.active_cell_iterators())
       {
         fe_point_eval.reinit(cell->active_cell_index());
-        for (unsigned int q : fe_point_eval.quadrature_point_indices())
+        for (const unsigned int q : fe_point_eval.quadrature_point_indices())
           deallog << fe_point_eval.JxW(q) << std::endl;
       }
   }

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.