Skip to content

Rename parameter hiding class member [blocks: #2310] #3323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/util/xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,23 +150,23 @@ void xmlt::do_indent(std::ostream &out, unsigned indent)
out << std::string(indent, ' ');
}

xmlt::elementst::const_iterator xmlt::find(const std::string &name) const
xmlt::elementst::const_iterator xmlt::find(const std::string &key) const
{
for(elementst::const_iterator it=elements.begin();
it!=elements.end();
it++)
if(it->name==name)
if(it->name == key)
return it;

return elements.end();
}

xmlt::elementst::iterator xmlt::find(const std::string &name)
xmlt::elementst::iterator xmlt::find(const std::string &key)
{
for(elementst::iterator it=elements.begin();
it!=elements.end();
it++)
if(it->name==name)
if(it->name == key)
return it;

return elements.end();
Expand Down
8 changes: 4 additions & 4 deletions src/util/xml.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class xmlt
attributest attributes;
elementst elements;

elementst::const_iterator find(const std::string &name) const;
elementst::iterator find(const std::string &name);
elementst::const_iterator find(const std::string &key) const;
elementst::iterator find(const std::string &key);

void set_attribute(
const std::string &attribute,
Expand Down Expand Up @@ -83,10 +83,10 @@ class xmlt
return "";
}

xmlt &new_element(const std::string &name)
xmlt &new_element(const std::string &key)
{
elements.push_back(xmlt());
elements.back().name=name;
elements.back().name = key;
return elements.back();
}

Expand Down