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

Unified Diff: Source/core/css/FontFaceCache.cpp

Issue 167123002: Simpler return value from HashTable::add()/HashMap::add() and others (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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/css/CSSValuePool.cpp ('k') | Source/core/css/PropertySetCSSStyleDeclaration.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/FontFaceCache.cpp
diff --git a/Source/core/css/FontFaceCache.cpp b/Source/core/css/FontFaceCache.cpp
index 91064ea425ced40d190f02dbcaba08f08074335b..59d8727c8bd43dce3f8c130d65d31d8af92a70bf 100644
--- a/Source/core/css/FontFaceCache.cpp
+++ b/Source/core/css/FontFaceCache.cpp
@@ -58,11 +58,11 @@ void FontFaceCache::addFontFace(CSSFontSelector* cssFontSelector, PassRefPtr<Fon
{
RefPtr<FontFace> fontFace = prpFontFace;
- OwnPtr<TraitsMap>& familyFontFaces = m_fontFaces.add(fontFace->family(), nullptr).iterator->value;
+ OwnPtr<TraitsMap>& familyFontFaces = m_fontFaces.add(fontFace->family(), nullptr).storedValue->value;
if (!familyFontFaces)
familyFontFaces = adoptPtr(new TraitsMap);
- RefPtr<CSSSegmentedFontFace>& segmentedFontFace = familyFontFaces->add(fontFace->traitsMask(), 0).iterator->value;
+ RefPtr<CSSSegmentedFontFace>& segmentedFontFace = familyFontFaces->add(fontFace->traitsMask(), 0).storedValue->value;
if (!segmentedFontFace)
segmentedFontFace = CSSSegmentedFontFace::create(cssFontSelector, static_cast<FontTraitsMask>(fontFace->traitsMask()));
@@ -193,13 +193,13 @@ CSSSegmentedFontFace* FontFaceCache::get(const FontDescription& fontDescription,
if (!familyFontFaces || familyFontFaces->isEmpty())
return 0;
- OwnPtr<TraitsMap>& segmentedFontFaceCache = m_fonts.add(family, nullptr).iterator->value;
+ OwnPtr<TraitsMap>& segmentedFontFaceCache = m_fonts.add(family, nullptr).storedValue->value;
if (!segmentedFontFaceCache)
segmentedFontFaceCache = adoptPtr(new TraitsMap);
FontTraitsMask traitsMask = fontDescription.traitsMask();
- RefPtr<CSSSegmentedFontFace>& face = segmentedFontFaceCache->add(traitsMask, 0).iterator->value;
+ RefPtr<CSSSegmentedFontFace>& face = segmentedFontFaceCache->add(traitsMask, 0).storedValue->value;
if (!face) {
for (TraitsMap::const_iterator i = familyFontFaces->begin(); i != familyFontFaces->end(); ++i) {
CSSSegmentedFontFace* candidate = i->value.get();
« no previous file with comments | « Source/core/css/CSSValuePool.cpp ('k') | Source/core/css/PropertySetCSSStyleDeclaration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698