]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix some clang-tidy findings 6834/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sun, 24 Jun 2018 21:58:17 +0000 (23:58 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sun, 24 Jun 2018 21:58:17 +0000 (23:58 +0200)
examples/step-18/step-18.cc
examples/step-36/step-36.cc
examples/step-8/step-8.cc
include/deal.II/matrix_free/matrix_free.h
source/dofs/dof_tools_constraints.cc

index a6767ffd61af9bf022c05633220b5667c329b721..176f46b8c111115197dffb21c1ce16567623d8b2 100644 (file)
@@ -962,7 +962,7 @@ namespace Step18
 
     // As in step-17, we only need to loop over all cells that belong to the
     // present processor:
-    for (const auto cell : dof_handler.active_cell_iterators())
+    for (const auto &cell : dof_handler.active_cell_iterators())
       if (cell->is_locally_owned())
         {
           cell_matrix = 0;
index 5951d7fd28f40fdf971f0b81057d7c0abfe2098e..d44c11290813ff28dc3e55b274dac738ebd03733 100644 (file)
@@ -258,7 +258,7 @@ namespace Step36
                          typename FunctionParser<dim>::ConstMap());
 
     std::vector<double> potential_values(n_q_points);
-    for (const auto cell : dof_handler.active_cell_iterators())
+    for (const auto &cell : dof_handler.active_cell_iterators())
       {
         fe_values.reinit(cell);
         cell_stiffness_matrix = 0;
index 971c778b7415c9834dcaae8e59d49227f86a70d2..4927b72858b46d6cbe44790c9c2f9d13be2902e0 100644 (file)
@@ -304,7 +304,7 @@ namespace Step8
     std::vector<Tensor<1, dim>> rhs_values(n_q_points);
 
     // Now we can begin with the loop over all cells:
-    for (const auto cell : dof_handler.active_cell_iterators())
+    for (const auto &cell : dof_handler.active_cell_iterators())
       {
         cell_matrix = 0;
         cell_rhs    = 0;
index dd86631b39c638bf105530368cb767bd80e3d655..33aa2c3bd5a30c94b3297f8ab27cc7e7c8f8d793 100644 (file)
@@ -45,8 +45,7 @@
 #include <deal.II/matrix_free/shape_info.h>
 #include <deal.II/matrix_free/task_info.h>
 
-#include <stdlib.h>
-
+#include <cstdlib>
 #include <limits>
 #include <list>
 #include <memory>
index 99d70c5a1e7dfd2c508156a0f642d2ce307f0e09..0c2bfbd9e3453399d99d102a551975fabaf64df4 100644 (file)
@@ -1080,7 +1080,7 @@ namespace DoFTools
       // note that even though we may visit a face twice if the neighboring
       // cells are equally refined, we can only visit each face with hanging
       // nodes once
-      for (const auto cell : dof_handler.active_cell_iterators())
+      for (const auto &cell : dof_handler.active_cell_iterators())
         {
           // artificial cells can at best neighbor ghost cells, but we're not
           // interested in these interfaces

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.