From 478a00381b56905d41eb09310537719abe60dda1 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sat, 11 May 2019 23:17:55 -0500 Subject: [PATCH] include: favor auto & cell --- include/deal.II/base/iterator_range.h | 2 +- include/deal.II/differentiation/ad/ad_helpers.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/deal.II/base/iterator_range.h b/include/deal.II/base/iterator_range.h index 41c5f40a6f..3d80ae29ea 100644 --- a/include/deal.II/base/iterator_range.h +++ b/include/deal.II/base/iterator_range.h @@ -52,7 +52,7 @@ class IteratorOverIterators; * @code * Triangulation triangulation; * ... - * for (auto cell : triangulation.active_cell_iterators()) + * for (auto & cell : triangulation.active_cell_iterators()) * cell->set_user_flag(); * @endcode * In other words, the cell objects are iterators, and the range diff --git a/include/deal.II/differentiation/ad/ad_helpers.h b/include/deal.II/differentiation/ad/ad_helpers.h index 5dec834e6e..b3e21e6ddf 100644 --- a/include/deal.II/differentiation/ad/ad_helpers.h +++ b/include/deal.II/differentiation/ad/ad_helpers.h @@ -1081,7 +1081,7 @@ namespace Differentiation * Vector cell_rhs (...); * * // Assembly loop: - * for (auto cell & : ...) + * for (auto & cell : ...) * { * cell->get_dof_indices(local_dof_indices); * const unsigned int n_independent_variables = @@ -1384,7 +1384,7 @@ namespace Differentiation * Vector cell_rhs (...); * * // Assembly loop: - * for (auto cell & : ...) + * for (auto & cell : ...) * { * cell->get_dof_indices(local_dof_indices); * const unsigned int n_independent_variables -- 2.39.5