diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-08-17 16:49:56 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-08-17 16:49:56 -0700 |
commit | 2a2a6aa7f51352fc481e78f6ad9d41f2738bcc48 (patch) | |
tree | 2fe8e322115572f1273add9f048c347ecc8217fd /core | |
parent | ce4ffb8183af3fa2bb5133f0f7370a88e064c516 (diff) | |
download | pdfium-2a2a6aa7f51352fc481e78f6ad9d41f2738bcc48.tar.xz |
Fix mac build breakage at ce4ffb8.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1287053006 .
Diffstat (limited to 'core')
-rw-r--r-- | core/src/fxge/apple/fx_mac_imp.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/core/src/fxge/apple/fx_mac_imp.cpp b/core/src/fxge/apple/fx_mac_imp.cpp index 5a4e6603df..8a39db6c37 100644 --- a/core/src/fxge/apple/fx_mac_imp.cpp +++ b/core/src/fxge/apple/fx_mac_imp.cpp @@ -65,10 +65,10 @@ void* CFX_MacFontInfo::MapFont(int weight, if (iBaseFont < 12) { return GetFont(face); } - void* p; - if (m_FontList.Lookup(face, p)) { - return p; - } + auto it = m_FontList.find(face); + if (it != m_FontList.end) + return it->second; + if (charset == FXFONT_ANSI_CHARSET && (pitch_family & FXFONT_FF_FIXEDPITCH)) { return GetFont("Courier New"); } @@ -88,9 +88,10 @@ void* CFX_MacFontInfo::MapFont(int weight, case FXFONT_CHINESEBIG5_CHARSET: face = "LiSong Pro Light"; } - if (m_FontList.Lookup(face, p)) { - return p; - } + it = m_FontList.Lookup(face); + if (it != m_FontList.end) + return it->second; + return NULL; } IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault(const char** pUnused) { |