Skip to content

Commit

Permalink
Merge Pull Request #5401 from trilinos/Trilinos/Fix-Teuchos-Parameter…
Browse files Browse the repository at this point in the history
…List-shadowing-warnings

Automatically Merged using Trilinos Pull Request AutoTester
PR Title: Teuchos::ParameterList: Fix 2 shadowing warnings
PR Author: mhoemmen
  • Loading branch information
trilinos-autotester authored Jun 18, 2019
2 parents dd41105 + 191c615 commit c80327f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/teuchos/parameterlist/src/Teuchos_ParameterList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,16 +516,16 @@ void ParameterList::modifyParameterList(ParameterList & valid_pl,
ConstIterator itr;
for (itr = valid_pl.begin(); itr != valid_pl.end(); ++itr){
const std::string &entry_name = itr->first;
const ParameterEntry &entry = itr->second;
if (entry.isList() && depth > 0){
const ParameterEntry &cur_entry = itr->second;
if (cur_entry.isList() && depth > 0){
ParameterList &valid_pl_sublist = valid_pl.sublist(entry_name, true);
if(!valid_pl_sublist.disableRecursiveModification_){
const ParameterEntry *validEntry = this->getEntryPtr(entry_name);
TEUCHOS_TEST_FOR_EXCEPTION(
!validEntry, Exceptions::InvalidParameterName
,"Error, the parameter {name=\""<<entry_name<<"\","
"type=\""<<entry.getAny(false).typeName()<<"\""
",value=\""<<filterValueToString(entry)<<"\"}"
"type=\""<<cur_entry.getAny(false).typeName()<<"\""
",value=\""<<filterValueToString(cur_entry)<<"\"}"
"\nin the parameter (sub)list \""<<this->name()<<"\""
"\nwas not found in the list of parameters during modification."
"\n\nThe parameters and types are:\n"
Expand Down Expand Up @@ -558,14 +558,14 @@ void ParameterList::reconcileParameterList(ParameterList & valid_pl,
for (auto itr = valid_cur_node.begin(); itr != valid_cur_node.end(); ++itr){
const std::string &entry_name = itr->first;
if (valid_cur_node.isSublist(entry_name)){
const ParameterEntry &entry = itr->second;
const ParameterEntry &cur_entry = itr->second;
ParameterList &valid_cur_node_sublist = valid_cur_node.sublist(entry_name);
if (!valid_cur_node_sublist.disableRecursiveReconciliation_){
TEUCHOS_TEST_FOR_EXCEPTION_PURE_MSG(
!cur_node.isSublist(entry_name), Exceptions::InvalidParameterName
,"Error, the parameter {name=\"" << entry_name <<"\","
"type=\"" << entry.getAny(false).typeName() << "\""
",value=\"" << filterValueToString(entry) << "\"}"
"type=\"" << cur_entry.getAny(false).typeName() << "\""
",value=\"" << filterValueToString(cur_entry) << "\"}"
"\nin the parameter (sub)list \"" <<cur_node.name() << "\""
"\nwas not found in the list of parameters during reconciliation."
"\n\nThe parameters and types are:\n"
Expand Down

0 comments on commit c80327f

Please sign in to comment.