From 5c1c5421036a5544876f2968f0a722ae69a30094 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sun, 19 Nov 2023 17:04:57 -0500 Subject: [PATCH] Fix two warnings in the test suite. These don't compile for me with -Werror. --- tests/lac/tensor_product_matrix_08.cc | 2 +- tests/multigrid/constrained_dofs_05.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/lac/tensor_product_matrix_08.cc b/tests/lac/tensor_product_matrix_08.cc index 250b0c8996..fbb41b2b86 100644 --- a/tests/lac/tensor_product_matrix_08.cc +++ b/tests/lac/tensor_product_matrix_08.cc @@ -204,7 +204,7 @@ do_test() std::tuple{0, false, true} // deformed hyper-cube }; - for (const auto setting : settings) + for (const auto &setting : settings) { Triangulation tria; diff --git a/tests/multigrid/constrained_dofs_05.cc b/tests/multigrid/constrained_dofs_05.cc index b6fab7929f..16849b7c67 100644 --- a/tests/multigrid/constrained_dofs_05.cc +++ b/tests/multigrid/constrained_dofs_05.cc @@ -95,7 +95,7 @@ check() // Print faces that connect to coarser DoF deallog << " Faces neighboring coarser cells:" << std::endl; - for (const auto level_cell : dof_handler.cell_iterators_on_level(level)) + for (const auto &level_cell : dof_handler.cell_iterators_on_level(level)) { // Iterate over all faces for (const unsigned int i_face : GeometryInfo::face_indices()) @@ -128,7 +128,7 @@ check() // Print faces that have periodic neighbors deallog << " Faces having periodic neighbors of same level:" << std::endl; - for (const auto level_cell : dof_handler.cell_iterators_on_level(level)) + for (const auto &level_cell : dof_handler.cell_iterators_on_level(level)) { // Iterate over all faces for (const unsigned int i_face : GeometryInfo::face_indices()) -- 2.39.5