[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
jorlow at chromium.org
jorlow at chromium.org
Thu Oct 29 20:37:43 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 5ab4329067cda41298173487306ee3844cb5768e
Author: jorlow at chromium.org <jorlow at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 1 19:54:25 2009 +0000
2009-09-30 Jeremy Orlow <jorlow at chromium.org>
Reviewed by Darin Adler.
Clean up use of const and mutable in StorageMap
https://bugs.webkit.org/show_bug.cgi?id=29933
What's the point of having every single member variable be mutable and nearly
every method be const? Let's clean it up.
* storage/StorageMap.cpp:
(WebCore::StorageMap::setIteratorToIndex):
(WebCore::StorageMap::key):
(WebCore::StorageMap::importItem):
* storage/StorageMap.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b06a070..3742ae4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2009-09-30 Jeremy Orlow <jorlow at chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Clean up use of const and mutable in StorageMap
+ https://bugs.webkit.org/show_bug.cgi?id=29933
+
+ What's the point of having every single member variable be mutable and nearly
+ every method be const? Let's clean it up.
+
+ * storage/StorageMap.cpp:
+ (WebCore::StorageMap::setIteratorToIndex):
+ (WebCore::StorageMap::key):
+ (WebCore::StorageMap::importItem):
+ * storage/StorageMap.h:
+
2009-10-01 Beth Dakin <bdakin at apple.com>
Reviewed by Dave Hyatt.
diff --git a/WebCore/storage/StorageMap.cpp b/WebCore/storage/StorageMap.cpp
index 6ddf323..85cff16 100644
--- a/WebCore/storage/StorageMap.cpp
+++ b/WebCore/storage/StorageMap.cpp
@@ -54,7 +54,7 @@ void StorageMap::invalidateIterator()
m_iteratorIndex = UINT_MAX;
}
-void StorageMap::setIteratorToIndex(unsigned index) const
+void StorageMap::setIteratorToIndex(unsigned index)
{
// FIXME: Once we have bidirectional iterators for HashMap we can be more intelligent about this.
// The requested index will be closest to begin(), our current iterator, or end(), and we
@@ -82,7 +82,7 @@ unsigned StorageMap::length() const
return m_map.size();
}
-String StorageMap::key(unsigned index) const
+String StorageMap::key(unsigned index)
{
if (index >= length())
return String();
@@ -145,7 +145,7 @@ bool StorageMap::contains(const String& key) const
return m_map.contains(key);
}
-void StorageMap::importItem(const String& key, const String& value) const
+void StorageMap::importItem(const String& key, const String& value)
{
// Be sure to copy the keys/values as items imported on a background thread are destined
// to cross a thread boundary
diff --git a/WebCore/storage/StorageMap.h b/WebCore/storage/StorageMap.h
index afb90bb..5ebb265 100644
--- a/WebCore/storage/StorageMap.h
+++ b/WebCore/storage/StorageMap.h
@@ -42,24 +42,24 @@ namespace WebCore {
static PassRefPtr<StorageMap> create();
unsigned length() const;
- String key(unsigned index) const;
+ String key(unsigned index);
String getItem(const String&) const;
PassRefPtr<StorageMap> setItem(const String& key, const String& value, String& oldValue);
PassRefPtr<StorageMap> removeItem(const String&, String& oldValue);
bool contains(const String& key) const;
- void importItem(const String& key, const String& value) const;
+ void importItem(const String& key, const String& value);
private:
StorageMap();
PassRefPtr<StorageMap> copy();
void invalidateIterator();
- void setIteratorToIndex(unsigned) const;
+ void setIteratorToIndex(unsigned);
- mutable HashMap<String, String> m_map;
- mutable HashMap<String, String>::iterator m_iterator;
- mutable unsigned m_iteratorIndex;
+ HashMap<String, String> m_map;
+ HashMap<String, String>::iterator m_iterator;
+ unsigned m_iteratorIndex;
};
} // namespace WebCore
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list