Index: third_party/WebKit/Source/core/dom/DOMStringList.cpp |
diff --git a/third_party/WebKit/Source/core/dom/DOMStringList.cpp b/third_party/WebKit/Source/core/dom/DOMStringList.cpp |
index 03a312b805d0133159d2c8f3f136c5abb78a4f7e..4350e60bb53631d3e4391f4a8daa0a02163112ca 100644 |
--- a/third_party/WebKit/Source/core/dom/DOMStringList.cpp |
+++ b/third_party/WebKit/Source/core/dom/DOMStringList.cpp |
@@ -72,9 +72,8 @@ bool DOMStringList::contains(ExecutionContext* context, |
// FIXME: Currently, all consumers of DOMStringList store fairly small lists |
// and thus an O(n) algorithm is OK. But this may need to be optimized if |
// larger amounts of data are stored in m_strings. |
- size_t count = m_strings.size(); |
- for (size_t i = 0; i < count; ++i) { |
- if (m_strings[i] == string) |
+ for (const auto& item : m_strings) { |
+ if (item == string) |
return true; |
} |
return false; |