diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-08-17 17:27:26 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-08-17 17:27:26 -0700 |
commit | 1d9dbd53b205b2b4d9e75a7eeb95e80837917ea3 (patch) | |
tree | 006d3f3dfe03e1a0d777643fb9d3cf82db94b414 /core | |
parent | cb4d0ea68308e3c51a6ba9551b393bb2f639afc4 (diff) | |
download | pdfium-1d9dbd53b205b2b4d9e75a7eeb95e80837917ea3.tar.xz |
Fix fix fix fix of breakage on mac.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1296383004 .
Diffstat (limited to 'core')
-rw-r--r-- | core/src/fxge/ge/fx_ge_text.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp index 1b839e0080..6938bb975d 100644 --- a/core/src/fxge/ge/fx_ge_text.cpp +++ b/core/src/fxge/ge/fx_ge_text.cpp @@ -1334,8 +1334,9 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap( bFontStyle, dest_width, anti_alias); } CFX_GlyphBitmap* pGlyphBitmap; - CFX_SizeGlyphCache* pSizeCache = NULL; - if (m_SizeMap.Lookup(FaceGlyphsKey, (void*&)pSizeCache)) { + auto it = m_SizeMap.find(FaceGlyphsKey); + if (it != m_SizeMap.end()) { + CFX_SizeGlyphCache* pSizeCache = it->second; if (pSizeCache->m_GlyphMap.Lookup((void*)(uintptr_t)glyph_index, (void*&)pGlyphBitmap)) { return pGlyphBitmap; @@ -1350,8 +1351,8 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap( pGlyphBitmap = RenderGlyph_Nativetext(pFont, glyph_index, pMatrix, dest_width, anti_alias); if (pGlyphBitmap) { - pSizeCache = new CFX_SizeGlyphCache; - m_SizeMap.SetAt(FaceGlyphsKey, pSizeCache); + CFX_SizeGlyphCache* pSizeCache = new CFX_SizeGlyphCache; + m_SizeMap[FaceGlyphsKey] = pSizeCache; pSizeCache->m_GlyphMap.SetAt((void*)(uintptr_t)glyph_index, pGlyphBitmap); return pGlyphBitmap; } |