Changeset 48992 in webkit
- Timestamp:
- Oct 1, 2009 12:54:25 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r48989 r48992 1 2009-09-30 Jeremy Orlow <jorlow@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 Clean up use of const and mutable in StorageMap 6 https://bugs.webkit.org/show_bug.cgi?id=29933 7 8 What's the point of having every single member variable be mutable and nearly 9 every method be const? Let's clean it up. 10 11 * storage/StorageMap.cpp: 12 (WebCore::StorageMap::setIteratorToIndex): 13 (WebCore::StorageMap::key): 14 (WebCore::StorageMap::importItem): 15 * storage/StorageMap.h: 16 1 17 2009-10-01 Beth Dakin <bdakin@apple.com> 2 18 -
trunk/WebCore/storage/StorageMap.cpp
r47808 r48992 55 55 } 56 56 57 void StorageMap::setIteratorToIndex(unsigned index) const57 void StorageMap::setIteratorToIndex(unsigned index) 58 58 { 59 59 // FIXME: Once we have bidirectional iterators for HashMap we can be more intelligent about this. … … 83 83 } 84 84 85 String StorageMap::key(unsigned index) const85 String StorageMap::key(unsigned index) 86 86 { 87 87 if (index >= length()) … … 146 146 } 147 147 148 void StorageMap::importItem(const String& key, const String& value) const148 void StorageMap::importItem(const String& key, const String& value) 149 149 { 150 150 // Be sure to copy the keys/values as items imported on a background thread are destined -
trunk/WebCore/storage/StorageMap.h
r47808 r48992 43 43 44 44 unsigned length() const; 45 String key(unsigned index) const;45 String key(unsigned index); 46 46 String getItem(const String&) const; 47 47 PassRefPtr<StorageMap> setItem(const String& key, const String& value, String& oldValue); … … 50 50 bool contains(const String& key) const; 51 51 52 void importItem(const String& key, const String& value) const;52 void importItem(const String& key, const String& value); 53 53 54 54 private: … … 56 56 PassRefPtr<StorageMap> copy(); 57 57 void invalidateIterator(); 58 void setIteratorToIndex(unsigned) const;58 void setIteratorToIndex(unsigned); 59 59 60 mutableHashMap<String, String> m_map;61 mutableHashMap<String, String>::iterator m_iterator;62 mutableunsigned m_iteratorIndex;60 HashMap<String, String> m_map; 61 HashMap<String, String>::iterator m_iterator; 62 unsigned m_iteratorIndex; 63 63 }; 64 64
Note: See TracChangeset
for help on using the changeset viewer.