From 25694831670ef6172b1b9b71359a6c192e26da20 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 21 Apr 2017 15:42:49 -0700 Subject: Use unique_ptr in CFX_FolderFontInfo::m_FontList Avoid a string duplication along the way. Change-Id: I866c34ad1afb20b9578aeb7cabeb8a185674c884 Reviewed-on: https://pdfium-review.googlesource.com/4437 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- core/fxge/apple/fx_mac_imp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fxge/apple') 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 -- cgit v1.2.3