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

Unified Diff: third_party/WebKit/Source/core/html/parser/BackgroundHTMLInputStream.cpp

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/BackgroundHTMLInputStream.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/BackgroundHTMLInputStream.cpp b/third_party/WebKit/Source/core/html/parser/BackgroundHTMLInputStream.cpp
index 906541c20fd2b0a406957b92a81d0354afa02f2a..dfcc058058572c18553b1853962556d05558e6e2 100644
--- a/third_party/WebKit/Source/core/html/parser/BackgroundHTMLInputStream.cpp
+++ b/third_party/WebKit/Source/core/html/parser/BackgroundHTMLInputStream.cpp
@@ -115,10 +115,10 @@ void BackgroundHTMLInputStream::rewindTo(HTMLInputCheckpoint checkpointIndex,
void BackgroundHTMLInputStream::updateTotalCheckpointTokenCount() {
m_totalCheckpointTokenCount = 0;
- size_t lastCheckpointIndex = m_checkpoints.size();
- for (size_t i = 0; i < lastCheckpointIndex; ++i)
+ for (const auto& checkpoint : m_checkpoints) {
m_totalCheckpointTokenCount +=
- m_checkpoints[i].tokensExtractedSincePreviousCheckpoint;
+ checkpoint.tokensExtractedSincePreviousCheckpoint;
+ }
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698