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

Unified Diff: Source/core/xml/XPathParser.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/XPathNodeSet.cpp ('k') | Source/core/xml/XPathStep.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XPathParser.cpp
diff --git a/Source/core/xml/XPathParser.cpp b/Source/core/xml/XPathParser.cpp
index a8af4984a42d177c4472d95e909cfa011aeacbe3..7111be856830a5220c9b904b1df2f02e0f92fc9d 100644
--- a/Source/core/xml/XPathParser.cpp
+++ b/Source/core/xml/XPathParser.cpp
@@ -481,14 +481,12 @@ PassOwnPtrWillBeRawPtr<Expression> Parser::parseStatement(const String& statemen
while (!m_parseNodes.isEmpty())
delete m_parseNodes.takeAny();
- HashSet<Vector<OwnPtr<Predicate> >*>::iterator pend = m_predicateVectors.end();
- for (HashSet<Vector<OwnPtr<Predicate> >*>::iterator it = m_predicateVectors.begin(); it != pend; ++it)
- delete *it;
+ for (auto& predicate : m_predicateVectors)
+ delete predicate;
m_predicateVectors.clear();
- HashSet<Vector<OwnPtr<Expression> >*>::iterator eend = m_expressionVectors.end();
- for (HashSet<Vector<OwnPtr<Expression> >*>::iterator it = m_expressionVectors.begin(); it != eend; ++it)
- delete *it;
+ for (auto& expression : m_expressionVectors)
+ delete expression;
m_expressionVectors.clear();
m_nodeTests.clear();
« no previous file with comments | « Source/core/xml/XPathNodeSet.cpp ('k') | Source/core/xml/XPathStep.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698