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/cfx_folderfontinfo.h | |
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/cfx_folderfontinfo.h')
-rw-r--r-- | core/fxge/ge/cfx_folderfontinfo.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fxge/ge/cfx_folderfontinfo.h b/core/fxge/ge/cfx_folderfontinfo.h index ab2468ade0..6aadb1526f 100644 --- a/core/fxge/ge/cfx_folderfontinfo.h +++ b/core/fxge/ge/cfx_folderfontinfo.h @@ -8,6 +8,7 @@ #define CORE_FXGE_GE_CFX_FOLDERFONTINFO_H_ #include <map> +#include <memory> #include <vector> #include "core/fxge/cfx_fontmapper.h" @@ -19,7 +20,7 @@ class CFX_FolderFontInfo : public IFX_SystemFontInfo { CFX_FolderFontInfo(); ~CFX_FolderFontInfo() override; - void AddPath(const CFX_ByteStringC& path); + void AddPath(const CFX_ByteString& path); // IFX_SytemFontInfo: bool EnumFontList(CFX_FontMapper* pMapper) override; @@ -59,7 +60,7 @@ class CFX_FolderFontInfo : public IFX_SystemFontInfo { const char* family, bool bMatchName); - std::map<CFX_ByteString, CFX_FontFaceInfo*> m_FontList; + std::map<CFX_ByteString, std::unique_ptr<CFX_FontFaceInfo>> m_FontList; std::vector<CFX_ByteString> m_PathList; CFX_FontMapper* m_pMapper; }; |