]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use constant strings in two places.
authorDavid Wells <wellsd2@rpi.edu>
Mon, 19 Jun 2017 20:41:34 +0000 (16:41 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Mon, 19 Jun 2017 20:41:34 +0000 (16:41 -0400)
source/base/parameter_handler.cc

index d26bdd7d3f09700f5675202ba61369c5d3290d39..1b27be4699dab1288dbecd72651a70a51c554dcc 100644 (file)
@@ -602,7 +602,7 @@ namespace Patterns
 
   bool List::match (const std::string &test_string_list) const
   {
-    std::vector<std::string> split_list =
+    const std::vector<std::string> split_list =
       Utilities::split_string_list(test_string_list, separator);
 
     if ((split_list.size() < min_elements) ||
@@ -610,7 +610,7 @@ namespace Patterns
       return false;
 
     // check the different possibilities
-    for (auto &string : split_list)
+    for (const std::string &string : split_list)
       if (pattern->match (string) == false)
         return false;
 

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.