Chromium Code Reviews| Index: core/src/fxge/ge/fx_ge_text.cpp |
| diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp |
| index 1b839e0080f4423875bc415efba1e5700ee1e809..0583c49b9f132a27a03104ee0a08882fc6b4c4d2 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; |
| @@ -1351,7 +1352,7 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap( |
| dest_width, anti_alias); |
| if (pGlyphBitmap) { |
| pSizeCache = new CFX_SizeGlyphCache; |
|
Lei Zhang
2015/08/18 00:23:19
This needs to be declared.
|
| - m_SizeMap.SetAt(FaceGlyphsKey, pSizeCache); |
| + m_SizeMap[FaceGlyphsKey] = pSizeCache; |
| pSizeCache->m_GlyphMap.SetAt((void*)(uintptr_t)glyph_index, pGlyphBitmap); |
| return pGlyphBitmap; |
| } |