Reviewed by Darin's rubberstamp
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Aug 2006 18:58:52 +0000 (18:58 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Aug 2006 18:58:52 +0000 (18:58 +0000)
        We apparently have a fancy delateAllValues() helper for HashMap/Sets - I'll use that instead

        * WebCore.xcodeproj/project.pbxproj:
        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::removeAllIcons):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16119 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/loader/icon/IconDatabase.cpp

index 29f7c2c34ba82baccfd928afbb9b2ca274c86c51..a67a35c02f86d1f45b74b29f10b4634e59581e17 100644 (file)
@@ -1,3 +1,13 @@
+2006-08-30  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Darin's rubberstamp
+
+        We apparently have a fancy delateAllValues() helper for HashMap/Sets - I'll use that instead
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * loader/icon/IconDatabase.cpp:
+        (WebCore::IconDatabase::removeAllIcons):
+
 2006-08-29  waylonis  <waylonis@google.com>
 
         Reviewed, tweaked by ggaren.
index 594f33f3835283561fd172d7607954ed198bd46d..74c68999b089f55302a6335b2dca2330e14f6da6 100644 (file)
@@ -172,10 +172,7 @@ void IconDatabase::removeAllIcons()
     m_pageURLToRetainCount.clear();
     m_iconURLToRetainCount.clear();
     
-    HashMap<String, IconDataCache*>::iterator i = m_iconURLToIconDataCacheMap.begin();
-    HashMap<String, IconDataCache*>::iterator end = m_iconURLToIconDataCacheMap.end();
-    for (; i != end; ++i)
-        delete i->second;
+    deleteAllValues(m_iconURLToIconDataCacheMap);
     m_iconURLToIconDataCacheMap.clear();
         
     // Wipe any pre-prepared statements, otherwise resetting the SQLDatabases themselves will fail