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

Unified Diff: third_party/WebKit/Source/core/html/track/TextTrackCueList.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/track/TextTrackCueList.cpp
diff --git a/third_party/WebKit/Source/core/html/track/TextTrackCueList.cpp b/third_party/WebKit/Source/core/html/track/TextTrackCueList.cpp
index 873258cde09d542a4530bbc7b0e09787ea1d0578..97c8269a0044d39c7457c6cb28b96cd39e5d080a 100644
--- a/third_party/WebKit/Source/core/html/track/TextTrackCueList.cpp
+++ b/third_party/WebKit/Source/core/html/track/TextTrackCueList.cpp
@@ -43,9 +43,9 @@ TextTrackCue* TextTrackCueList::anonymousIndexedGetter(unsigned index) const {
}
TextTrackCue* TextTrackCueList::getCueById(const AtomicString& id) const {
- for (size_t i = 0; i < m_list.size(); ++i) {
- if (m_list[i]->id() == id)
- return m_list[i].get();
+ for (const auto& cue : m_list) {
+ if (cue->id() == id)
+ return cue.get();
}
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698