From e05e3f36a51f12e7e62bcba71e0c9a855b13daea Mon Sep 17 00:00:00 2001 From: David Wells Date: Thu, 5 Dec 2019 11:10:23 -0500 Subject: [PATCH] Use a ranged-for loop. --- source/base/function_parser.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/base/function_parser.cc b/source/base/function_parser.cc index c9f27cd1b9..7758c114b4 100644 --- a/source/base/function_parser.cc +++ b/source/base/function_parser.cc @@ -281,12 +281,9 @@ FunctionParser::init_muparser() const { fp.get().emplace_back(new mu::Parser()); - for (std::map::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) -- 2.39.5