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

Unified Diff: Source/core/xml/XPathNodeSet.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/loader/ImageLoader.cpp ('k') | Source/core/xml/XPathParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XPathNodeSet.cpp
diff --git a/Source/core/xml/XPathNodeSet.cpp b/Source/core/xml/XPathNodeSet.cpp
index 0d14afd89ce05d5c0f783202004d0d6541f3b565..d96a2792c9b4c5c5f17614b78aebb67d6aa30d77 100644
--- a/Source/core/xml/XPathNodeSet.cpp
+++ b/Source/core/xml/XPathNodeSet.cpp
@@ -235,9 +235,8 @@ void NodeSet::traversalSort() const
Element* element = toElement(&n);
AttributeCollection attributes = element->attributes();
- AttributeCollection::iterator end = attributes.end();
- for (AttributeCollection::iterator it = attributes.begin(); it != end; ++it) {
- RefPtrWillBeRawPtr<Attr> attr = element->attrIfExists(it->name());
+ for (auto& attribute : attributes) {
+ RefPtrWillBeRawPtr<Attr> attr = element->attrIfExists(attribute.name());
if (attr && nodes.contains(attr.get()))
sortedNodes.append(attr);
}
« no previous file with comments | « Source/core/loader/ImageLoader.cpp ('k') | Source/core/xml/XPathParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698