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

Unified Diff: third_party/WebKit/Source/core/html/track/LoadableTextTrack.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/LoadableTextTrack.cpp
diff --git a/third_party/WebKit/Source/core/html/track/LoadableTextTrack.cpp b/third_party/WebKit/Source/core/html/track/LoadableTextTrack.cpp
index a9357ed80a4a5fcf7959ef238cb9bfae9dfc0570..6f7872b19fc9f0cc4c109bf350944bc70cec8e71 100644
--- a/third_party/WebKit/Source/core/html/track/LoadableTextTrack.cpp
+++ b/third_party/WebKit/Source/core/html/track/LoadableTextTrack.cpp
@@ -55,9 +55,9 @@ void LoadableTextTrack::setMode(const AtomicString& mode) {
void LoadableTextTrack::addRegions(
const HeapVector<Member<VTTRegion>>& newRegions) {
- for (size_t i = 0; i < newRegions.size(); ++i) {
- newRegions[i]->setTrack(this);
- regions()->add(newRegions[i]);
+ for (const auto& region : newRegions) {
+ region->setTrack(this);
+ regions()->add(region);
}
}

Powered by Google App Engine
This is Rietveld 408576698