From cd2bb30aba89a05c0bbd4d6973fa070205e3a1e8 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 22 Dec 2015 13:49:44 -0800 Subject: Merge to XFA: Add ContainsKey() and ContainsValue() and use them where appropriate. TBR=ochang@chromium.org Review URL: https://codereview.chromium.org/1540263003 . (cherry picked from commit 1fc92867ca53f0fba4272fbee3814d844f487495) Review URL: https://codereview.chromium.org/1542193002 . --- core/src/fxge/ge/fx_ge_fontmap.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/src/fxge/ge') diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp index 7f5dbe0ce7..6432397e04 100644 --- a/core/src/fxge/ge/fx_ge_fontmap.cpp +++ b/core/src/fxge/ge/fx_ge_fontmap.cpp @@ -9,7 +9,7 @@ #include "core/include/fxge/fx_freetype.h" #include "core/include/fxge/fx_ge.h" #include "core/src/fxge/fontdata/chromefontdata/chromefontdata.h" -#include "text_int.h" +#include "core/src/fxge/ge/text_int.h" #include "third_party/base/stl_util.h" #define GET_TT_SHORT(w) (FX_WORD)(((w)[0] << 8) | (w)[1]) @@ -1426,9 +1426,9 @@ void CFX_FolderFontInfo::ReportFace(CFX_ByteString& path, if (style != "Regular") { facename += " " + style; } - if (m_FontList.find(facename) != m_FontList.end()) { + if (pdfium::ContainsKey(m_FontList, facename)) return; - } + CFX_FontFaceInfo* pInfo = new CFX_FontFaceInfo(path, facename, tables, offset, filesize); CFX_ByteString os2 = FPDF_LoadTableFromTT(pFile, tables, nTables, 0x4f532f32); -- cgit v1.2.3