diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-17T17·24+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-17T18·13+0200 |
commit | 6bd2c7bb386de16310fa5534275e6e638be60862 (patch) | |
tree | 0a12144dfb4e8d1b069bc09d583b522b5c158b28 /src/libutil/xml-writer.cc | |
parent | 1511aa9f488ba0762c2da0bf8ab61b5fde47305d (diff) |
OCD: foreach -> C++11 ranged for
Diffstat (limited to 'src/libutil/xml-writer.cc')
-rw-r--r-- | src/libutil/xml-writer.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libutil/xml-writer.cc b/src/libutil/xml-writer.cc index 01794001b2c6..98bd058d18be 100644 --- a/src/libutil/xml-writer.cc +++ b/src/libutil/xml-writer.cc @@ -73,10 +73,10 @@ void XMLWriter::writeEmptyElement(const string & name, void XMLWriter::writeAttrs(const XMLAttrs & attrs) { - for (XMLAttrs::const_iterator i = attrs.begin(); i != attrs.end(); ++i) { - output << " " << i->first << "=\""; - for (unsigned int j = 0; j < i->second.size(); ++j) { - char c = i->second[j]; + for (auto & i : attrs) { + output << " " << i.first << "=\""; + for (unsigned int j = 0; j < i.second.size(); ++j) { + char c = i.second[j]; if (c == '"') output << """; else if (c == '<') output << "<"; else if (c == '>') output << ">"; |