]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Follow recommendations of clang-tidy.
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 9 Jul 2021 21:00:40 +0000 (15:00 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 15 Jul 2021 16:35:54 +0000 (10:35 -0600)
source/base/data_out_base.cc

index 0eefce3224d6f2c1bed1f937a76073fd333f7bb8..9fbae84aed6662b78ae63e23f3ab9a23db58d637 100644 (file)
@@ -5466,7 +5466,7 @@ namespace DataOutBase
     // quote characters as this would make the VTU file invalid XML and
     // probably lead to all sorts of difficult error messages. Other than that,
     // trust the user that whatever they provide makes sense somehow.
-    for (const auto unit : flags.physical_units)
+    for (const auto &unit : flags.physical_units)
       Assert(
         unit.second.find('\"') == std::string::npos,
         ExcMessage(
@@ -5906,7 +5906,7 @@ namespace DataOutBase
     // quote characters as this would make the VTU file invalid XML and
     // probably lead to all sorts of difficult error messages. Other than that,
     // trust the user that whatever they provide makes sense somehow.
-    for (const auto unit : flags.physical_units)
+    for (const auto &unit : flags.physical_units)
       Assert(
         unit.second.find('\"') == std::string::npos,
         ExcMessage(
@@ -5966,7 +5966,7 @@ namespace DataOutBase
         // underscores unless a vector name has been specified
         out << "    <PDataArray type=\"Float32\" Name=\"";
 
-        const std::string name = std::get<2>(nonscalar_data_range);
+        const std::string &name = std::get<2>(nonscalar_data_range);
         if (!name.empty())
           out << name;
         else

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.