summaryrefslogtreecommitdiff
path: root/core/src/fxge/apple
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxge/apple')
-rw-r--r--core/src/fxge/apple/fx_mac_imp.cpp15
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 e08f6224d8..88a51bd78c 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.find(face);
+ if (it != m_FontList.end())
+ return it->second;
+
return NULL;
}
IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault() {