]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid copies clang-tidy complains about 6109/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 28 Mar 2018 08:40:33 +0000 (10:40 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 28 Mar 2018 08:40:33 +0000 (10:40 +0200)
source/grid/grid_tools.cc

index 23ef95321d1f6d054f4d709027b15d2f781ebf59..7a8e74df857d9df825093af80ca39e8b710342b9 100644 (file)
@@ -2708,7 +2708,7 @@ next_cell:
   minimal_cell_diameter (const Triangulation<dim, spacedim> &triangulation)
   {
     double min_diameter = std::numeric_limits<double>::max();
-    for (const auto cell: triangulation.active_cell_iterators())
+    for (const auto &cell: triangulation.active_cell_iterators())
       if (!cell->is_artificial())
         min_diameter = std::min (min_diameter,
                                  cell->diameter());
@@ -2722,7 +2722,7 @@ next_cell:
   maximal_cell_diameter (const Triangulation<dim, spacedim> &triangulation)
   {
     double max_diameter = 0.;
-    for (const auto cell: triangulation.active_cell_iterators())
+    for (const auto &cell: triangulation.active_cell_iterators())
       if (!cell->is_artificial())
         max_diameter = std::max (max_diameter,
                                  cell->diameter());

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.