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

Unified Diff: Source/core/css/CSSSegmentedFontFace.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/CSSFontFaceSource.cpp ('k') | Source/core/css/CSSValuePool.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSSegmentedFontFace.cpp
diff --git a/Source/core/css/CSSSegmentedFontFace.cpp b/Source/core/css/CSSSegmentedFontFace.cpp
index de5997a9eb6655427cc62ae16ca80f25dd36d2f8..f6d2f8a7e24394cdb149e88edf4d5c7a2a9084d8 100644
--- a/Source/core/css/CSSSegmentedFontFace.cpp
+++ b/Source/core/css/CSSSegmentedFontFace.cpp
@@ -95,9 +95,10 @@ void CSSSegmentedFontFace::addFontFace(PassRefPtr<FontFace> prpFontFace, bool cs
if (cssConnected) {
m_fontFaces.insertBefore(m_firstNonCssConnectedFace, fontFace);
} else {
- FontFaceList::AddResult result = m_fontFaces.add(fontFace);
+ // This is the only place in Blink that is using addReturnIterator.
+ FontFaceList::iterator iterator = m_fontFaces.addReturnIterator(fontFace);
if (m_firstNonCssConnectedFace == m_fontFaces.end())
- m_firstNonCssConnectedFace = result.iterator;
+ m_firstNonCssConnectedFace = iterator;
}
}
@@ -138,7 +139,7 @@ PassRefPtr<FontData> CSSSegmentedFontFace::getFontData(const FontDescription& fo
AtomicString emptyFontFamily = "";
FontCacheKey key = fontDescription.cacheKey(emptyFontFamily, desiredTraitsMask);
- RefPtr<SegmentedFontData>& fontData = m_fontDataTable.add(key.hash(), 0).iterator->value;
+ RefPtr<SegmentedFontData>& fontData = m_fontDataTable.add(key.hash(), 0).storedValue->value;
if (fontData && fontData->numRanges())
return fontData; // No release, we have a reference to an object in the cache which should retain the ref count it has.
« no previous file with comments | « Source/core/css/CSSFontFaceSource.cpp ('k') | Source/core/css/CSSValuePool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698