]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix warning about copying in range-based for loop 10024/head
authorDaniel Arndt <arndtd@ornl.gov>
Sun, 3 May 2020 03:54:42 +0000 (23:54 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Sun, 3 May 2020 03:59:20 +0000 (23:59 -0400)
include/deal.II/base/symbolic_function.h

index c188d6846403fd6086329e4809d3c413c937ab65..fe46ba8833ffd23ffce480679a9869fda44d99e6 100644 (file)
@@ -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 << " )";

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.