Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1803)

Unified Diff: Source/core/xml/parser/XMLDocumentParser.cpp

Issue 781673002: Use C++11 range-based loop for core/xml and core/loader (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove unnecessary curly brackets Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/xml/XSLTProcessorLibxslt.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/parser/XMLDocumentParser.cpp
diff --git a/Source/core/xml/parser/XMLDocumentParser.cpp b/Source/core/xml/parser/XMLDocumentParser.cpp
index e2738240ce8ca06b1d335f98474a90717198049c..7dc6a6ba07062af259058779ead7e93ec3d0845e 100644
--- a/Source/core/xml/parser/XMLDocumentParser.cpp
+++ b/Source/core/xml/parser/XMLDocumentParser.cpp
@@ -822,12 +822,11 @@ XMLDocumentParser::XMLDocumentParser(DocumentFragment* fragment, Element* parent
for (; !elemStack.isEmpty(); elemStack.removeLast()) {
Element* element = elemStack.last();
AttributeCollection attributes = element->attributes();
- AttributeCollection::iterator end = attributes.end();
- for (AttributeCollection::iterator it = attributes.begin(); it != end; ++it) {
- if (it->localName() == xmlnsAtom)
- m_defaultNamespaceURI = it->value();
- else if (it->prefix() == xmlnsAtom)
- m_prefixToNamespaceMap.set(it->localName(), it->value());
+ for (auto& attribute : attributes) {
+ if (attribute.localName() == xmlnsAtom)
+ m_defaultNamespaceURI = attribute.value();
+ else if (attribute.prefix() == xmlnsAtom)
+ m_prefixToNamespaceMap.set(attribute.localName(), attribute.value());
}
}
« no previous file with comments | « Source/core/xml/XSLTProcessorLibxslt.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698