From: Daniel Arndt Date: Wed, 28 Mar 2018 08:40:33 +0000 (+0200) Subject: Avoid copies clang-tidy complains about X-Git-Tag: v9.0.0-rc1~272^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a12dff50c0e51be4ba2779982f81abe388684ccd;p=dealii.git Avoid copies clang-tidy complains about --- diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 23ef95321d..7a8e74df85 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -2708,7 +2708,7 @@ next_cell: minimal_cell_diameter (const Triangulation &triangulation) { double min_diameter = std::numeric_limits::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 &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());