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

Unified Diff: third_party/WebKit/Source/core/dom/ClientRectList.cpp

Issue 2553343002: Avoid WTF::Vector::at() and operator[] in core/dom. (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/dom/ClientRectList.cpp
diff --git a/third_party/WebKit/Source/core/dom/ClientRectList.cpp b/third_party/WebKit/Source/core/dom/ClientRectList.cpp
index be5ff50c23b990de2e2d6c74bcd71db87f9f87c6..02c2dbf639d86bce53d8837120f45ccb8ad675e4 100644
--- a/third_party/WebKit/Source/core/dom/ClientRectList.cpp
+++ b/third_party/WebKit/Source/core/dom/ClientRectList.cpp
@@ -32,8 +32,8 @@ ClientRectList::ClientRectList() {}
ClientRectList::ClientRectList(const Vector<FloatQuad>& quads) {
m_list.reserveInitialCapacity(quads.size());
- for (size_t i = 0; i < quads.size(); ++i)
- m_list.append(ClientRect::create(quads[i].boundingBox()));
+ for (const auto& quad : quads)
+ m_list.append(ClientRect::create(quad.boundingBox()));
}
unsigned ClientRectList::length() const {
« no previous file with comments | « third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp ('k') | third_party/WebKit/Source/core/dom/CompositorProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698