summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/DOMStringList.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/dom/DOMStringList.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
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;