diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-04-21 15:42:49 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-21 23:11:20 +0000 |
commit | 25694831670ef6172b1b9b71359a6c192e26da20 (patch) | |
tree | 871a77ab2298d89dd7e4f897d8ae5e8f60c8e42a /core/fxge/ge/fx_ge_linux.cpp | |
parent | 350d2d904a3e6bd1e96542c5e223d301d9bdbe6a (diff) | |
download | pdfium-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/ge/fx_ge_linux.cpp')
-rw-r--r-- | core/fxge/ge/fx_ge_linux.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fxge/ge/fx_ge_linux.cpp b/core/fxge/ge/fx_ge_linux.cpp index 8d2c496c19..b216e12127 100644 --- a/core/fxge/ge/fx_ge_linux.cpp +++ b/core/fxge/ge/fx_ge_linux.cpp @@ -97,7 +97,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, for (size_t i = 0; i < kLinuxGpNameSize; i++) { auto it = m_FontList.find(g_LinuxGpFontList[index][i]); if (it != m_FontList.end()) - return it->second; + return it->second.get(); } break; } @@ -105,7 +105,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, for (size_t i = 0; i < FX_ArraySize(g_LinuxGbFontList); ++i) { auto it = m_FontList.find(g_LinuxGbFontList[i]); if (it != m_FontList.end()) - return it->second; + return it->second.get(); } break; } @@ -113,7 +113,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, for (size_t i = 0; i < FX_ArraySize(g_LinuxB5FontList); ++i) { auto it = m_FontList.find(g_LinuxB5FontList[i]); if (it != m_FontList.end()) - return it->second; + return it->second.get(); } break; } @@ -121,7 +121,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight, for (size_t i = 0; i < FX_ArraySize(g_LinuxHGFontList); ++i) { auto it = m_FontList.find(g_LinuxHGFontList[i]); if (it != m_FontList.end()) - return it->second; + return it->second.get(); } break; } |