summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/DOMStringList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/dom/DOMStringList.cpp')
-rw-r--r--Source/WebCore/dom/DOMStringList.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/WebCore/dom/DOMStringList.cpp b/Source/WebCore/dom/DOMStringList.cpp
index bcc0d23ba..8826b9344 100644
--- a/Source/WebCore/dom/DOMStringList.cpp
+++ b/Source/WebCore/dom/DOMStringList.cpp
@@ -40,9 +40,8 @@ bool DOMStringList::contains(const String& string) const
// 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 (auto& value : m_strings) {
+ if (value == string)
return true;
}
return false;