]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use a ranged-for loop.
authorDavid Wells <drwells@email.unc.edu>
Thu, 5 Dec 2019 16:10:23 +0000 (11:10 -0500)
committerDavid Wells <drwells@email.unc.edu>
Mon, 9 Dec 2019 19:30:21 +0000 (14:30 -0500)
source/base/function_parser.cc

index c9f27cd1b9956e91358cb2b3a8f8b6d643bfd68d..7758c114b41a9fdfdb2e39f89e4c1b0077b9d600 100644 (file)
@@ -281,12 +281,9 @@ FunctionParser<dim>::init_muparser() const
     {
       fp.get().emplace_back(new mu::Parser());
 
-      for (std::map<std::string, double>::const_iterator constant =
-             constants.begin();
-           constant != constants.end();
-           ++constant)
+      for (const auto &constant : constants)
         {
-          fp.get()[component]->DefineConst(constant->first, constant->second);
+          fp.get()[component]->DefineConst(constant.first, constant.second);
         }
 
       for (unsigned int iv = 0; iv < var_names.size(); ++iv)

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.