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

Unified Diff: third_party/WebKit/Source/core/html/track/vtt/VTTRegionList.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
« no previous file with comments | « third_party/WebKit/Source/core/html/track/TrackListBase.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/track/vtt/VTTRegionList.cpp
diff --git a/third_party/WebKit/Source/core/html/track/vtt/VTTRegionList.cpp b/third_party/WebKit/Source/core/html/track/vtt/VTTRegionList.cpp
index e6f9904f6b7af94deeb73bd6ccfe1a25bfc34e21..d0671f07144b9ce7b7661530322780835e897b64 100644
--- a/third_party/WebKit/Source/core/html/track/vtt/VTTRegionList.cpp
+++ b/third_party/WebKit/Source/core/html/track/vtt/VTTRegionList.cpp
@@ -44,9 +44,9 @@ VTTRegion* VTTRegionList::getRegionById(const String& id) const {
if (id.isEmpty())
return nullptr;
- for (size_t i = 0; i < m_list.size(); ++i) {
- if (m_list[i]->id() == id)
- return m_list[i].get();
+ for (const auto& region : m_list) {
+ if (region->id() == id)
+ return region.get();
}
return nullptr;
« no previous file with comments | « third_party/WebKit/Source/core/html/track/TrackListBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698