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

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

Issue 2556043002: Avoid WTF::Vector::at() and operator[] in core/html. (Closed)
Patch Set: _ Created 4 years 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: third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.h
diff --git a/third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.h b/third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.h
index 514c955371ce1f188dc82fb2adcaf0607febe8eb..fb6d1a081c8ad8f9883b56a94adf8a29e09e7fb9 100644
--- a/third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.h
+++ b/third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.h
@@ -222,8 +222,7 @@ inline void AtomicHTMLToken::initializeAttributes(
m_attributes.clear();
m_attributes.reserveInitialCapacity(size);
- for (size_t i = 0; i < size; ++i) {
- const HTMLToken::Attribute& attribute = attributes[i];
+ for (const auto& attribute : attributes) {
if (attribute.nameAsVector().isEmpty())
continue;

Powered by Google App Engine
This is Rietveld 408576698