From: Daniel Arndt Date: Sun, 3 May 2020 03:54:42 +0000 (-0400) Subject: Fix warning about copying in range-based for loop X-Git-Tag: v9.2.0-rc1~136^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10024%2Fhead;p=dealii.git Fix warning about copying in range-based for loop --- diff --git a/include/deal.II/base/symbolic_function.h b/include/deal.II/base/symbolic_function.h index c188d68464..fe46ba8833 100644 --- a/include/deal.II/base/symbolic_function.h +++ b/include/deal.II/base/symbolic_function.h @@ -443,8 +443,8 @@ namespace Functions { for (unsigned int i = 0; i < dim; ++i) out << coordinate_symbols[i] << ", "; - for (const auto it : additional_function_arguments) - out << it.first << ", "; + for (const auto &argument_pair : additional_function_arguments) + out << argument_pair.first << ", "; out << time_symbol << " -> " << user_function[0]; for (unsigned int i = 1; i < user_function.size(); ++i) out << "; " << user_function[i]; @@ -452,9 +452,9 @@ namespace Functions { out << " # ( "; std::string sep = ""; - for (const auto it : user_substitution_map) + for (const auto &substitution : user_substitution_map) { - out << sep << it.first << " = " << it.second; + out << sep << substitution.first << " = " << substitution.second; sep = ", "; } out << " )";