summaryrefslogtreecommitdiff
path: root/core/fxge/apple
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-04-21 15:42:49 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-21 23:11:20 +0000
commit25694831670ef6172b1b9b71359a6c192e26da20 (patch)
tree871a77ab2298d89dd7e4f897d8ae5e8f60c8e42a /core/fxge/apple
parent350d2d904a3e6bd1e96542c5e223d301d9bdbe6a (diff)
downloadpdfium-25694831670ef6172b1b9b71359a6c192e26da20.tar.xz
Use unique_ptr in CFX_FolderFontInfo::m_FontListchromium/3079
Avoid a string duplication along the way. Change-Id: I866c34ad1afb20b9578aeb7cabeb8a185674c884 Reviewed-on: https://pdfium-review.googlesource.com/4437 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge/apple')
-rw-r--r--core/fxge/apple/fx_mac_imp.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fxge/apple/fx_mac_imp.cpp b/core/fxge/apple/fx_mac_imp.cpp
index cb1adf701f..0b32083126 100644
--- a/core/fxge/apple/fx_mac_imp.cpp
+++ b/core/fxge/apple/fx_mac_imp.cpp
@@ -88,12 +88,12 @@ void* CFX_MacFontInfo::MapFont(int weight,
new_face += " Italic";
auto it = m_FontList.find(new_face);
if (it != m_FontList.end())
- return it->second;
+ return it->second.get();
}
auto it = m_FontList.find(face);
if (it != m_FontList.end())
- return it->second;
+ return it->second.get();
if (charset == FX_CHARSET_ANSI && (pitch_family & FXFONT_FF_FIXEDPITCH))
return GetFont("Courier New");
@@ -115,7 +115,7 @@ void* CFX_MacFontInfo::MapFont(int weight,
face = "LiSong Pro Light";
}
it = m_FontList.find(face);
- return it != m_FontList.end() ? it->second : nullptr;
+ return it != m_FontList.end() ? it->second.get() : nullptr;
}
} // namespace