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

Unified Diff: third_party/WebKit/Source/core/dom/SpaceSplitString.h

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/SpaceSplitString.h
diff --git a/third_party/WebKit/Source/core/dom/SpaceSplitString.h b/third_party/WebKit/Source/core/dom/SpaceSplitString.h
index e9a0a97567e7e078f30c76868f69753d44bc9f55..cb52132ae773ed192c48247fdbd08641702a919d 100644
--- a/third_party/WebKit/Source/core/dom/SpaceSplitString.h
+++ b/third_party/WebKit/Source/core/dom/SpaceSplitString.h
@@ -67,9 +67,8 @@ class SpaceSplitString {
~Data();
bool contains(const AtomicString& string) {
- size_t size = m_vector.size();
- for (size_t i = 0; i < size; ++i) {
- if (m_vector[i] == string)
+ for (const auto& item : m_vector) {
+ if (item == string)
return true;
}
return false;
« no previous file with comments | « third_party/WebKit/Source/core/dom/SelectorQuery.cpp ('k') | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698