]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Comply with clang-tidy.
authorLuca Heltai <luca.heltai@sissa.it>
Wed, 10 Apr 2019 16:40:59 +0000 (18:40 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Tue, 30 Apr 2019 15:45:34 +0000 (17:45 +0200)
include/deal.II/base/patterns.h
source/base/parsed_convergence_table.cc

index bbb5b50adf6c3a65502d6fca73263b2cb3d52ba0..963eaa377928f091626b41b6def0637d668e5703 100644 (file)
@@ -1803,7 +1803,7 @@ namespace Patterns
         std::vector<std::string> vec(t.size());
 
         unsigned int i = 0;
-        for (const auto entry : t)
+        for (const auto &entry : t)
           vec[i++] = Convert<typename T::value_type>::to_string(entry, base_p);
 
         std::string s;
index 0139d976d20389af14c40fb66738d2f304f44f91..cda4afffb8d1c1c44746c7fa004ffe6ddb3ced94 100644 (file)
@@ -48,10 +48,10 @@ namespace
     for (unsigned int i = 0; i < component_names.size(); ++i)
       {
         if (unique_component_names[j] != component_names[i])
-          masks.push_back(ComponentMask(bools[j++]));
+          masks.emplace_back(ComponentMask(bools[j++]));
         bools[j][i] = true;
       }
-    masks.push_back(ComponentMask(bools[j++]));
+    masks.emplace_back(ComponentMask(bools[j++]));
     AssertDimension(j, unique_component_names.size());
     return masks;
   }
@@ -174,7 +174,7 @@ ParsedConvergenceTable::output_table(std::ostream &out)
       if (error_file_name != "")
         {
           const std::string error_file_format =
-            error_file_name.substr(error_file_name.find_last_of(".") + 1);
+            error_file_name.substr(error_file_name.find_last_of('.') + 1);
 
           std::ofstream table_file(error_file_name);
 

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.