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

Unified Diff: Source/core/html/parser/AtomicHTMLToken.h

Issue 656723005: Use C++11 features in core/html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use meaningful names Created 6 years, 2 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
Index: Source/core/html/parser/AtomicHTMLToken.h
diff --git a/Source/core/html/parser/AtomicHTMLToken.h b/Source/core/html/parser/AtomicHTMLToken.h
index 720736cdea5a0229ea256eae03f67cb93b2970ce..dd4b8217e9b467f6d7280ae3683f0e4bc9ff7cd3 100644
--- a/Source/core/html/parser/AtomicHTMLToken.h
+++ b/Source/core/html/parser/AtomicHTMLToken.h
@@ -162,11 +162,11 @@ public:
break;
case HTMLToken::StartTag:
m_attributes.reserveInitialCapacity(token.attributes().size());
- for (Vector<CompactHTMLToken::Attribute>::const_iterator it = token.attributes().begin(); it != token.attributes().end(); ++it) {
- QualifiedName name(nullAtom, AtomicString(it->name), nullAtom);
+ for (const auto& it : token.attributes()) {
+ QualifiedName name(nullAtom, AtomicString(it.name), nullAtom);
// FIXME: This is N^2 for the number of attributes.
if (!findAttributeInVector(m_attributes, name))
- m_attributes.append(Attribute(name, AtomicString(it->value)));
+ m_attributes.append(Attribute(name, AtomicString(it.value)));
}
// Fall through!
case HTMLToken::EndTag:

Powered by Google App Engine
This is Rietveld 408576698