Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Unified Diff: Source/platform/fonts/FontCache.cpp

Issue 256743005: Add removeAll method to sets and maps and use them (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moved implementation of removeAll to HashTable.h and shared it. Also added it to LinkedHashSet Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/SVGDocumentExtensions.cpp ('k') | Source/web/AssociatedURLLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/FontCache.cpp
diff --git a/Source/platform/fonts/FontCache.cpp b/Source/platform/fonts/FontCache.cpp
index c60c1dcd15cee91eb41bf3fcfedadc78fa5ec725..e54e0d8dc25e491a130cbd23b9d5c9efaa6817f8 100644
--- a/Source/platform/fonts/FontCache.cpp
+++ b/Source/platform/fonts/FontCache.cpp
@@ -197,10 +197,7 @@ static inline void purgePlatformFontDataCache()
if (platformData->value && !gFontDataCache->contains(platformData->value.get()))
keysToRemove.append(platformData->key);
}
-
- size_t keysToRemoveCount = keysToRemove.size();
- for (size_t i = 0; i < keysToRemoveCount; ++i)
- gFontPlatformDataCache->remove(keysToRemove[i]);
+ gFontPlatformDataCache->removeAll(keysToRemove);
}
static inline void purgeFontVerticalDataCache()
@@ -223,8 +220,7 @@ static inline void purgeFontVerticalDataCache()
if (!verticalData->value || !verticalData->value->inFontCache())
keysToRemove.append(verticalData->key);
}
- for (size_t i = 0, count = keysToRemove.size(); i < count; ++i)
- fontVerticalDataCache.take(keysToRemove[i]);
+ fontVerticalDataCache.removeAll(keysToRemove);
}
#endif
}
« no previous file with comments | « Source/core/svg/SVGDocumentExtensions.cpp ('k') | Source/web/AssociatedURLLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698