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

Unified Diff: core/src/fxge/apple/fx_mac_imp.cpp

Issue 1287053006: Fix mac build breakage at ce4ffb8. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/apple/fx_mac_imp.cpp
diff --git a/core/src/fxge/apple/fx_mac_imp.cpp b/core/src/fxge/apple/fx_mac_imp.cpp
index 5a4e6603df26dd1068be4794086b7d6c0c2bbf50..8a39db6c379076a1bab56ab7c2592a107c8a54ae 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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698