summaryrefslogtreecommitdiff
path: root/core/fxge/ge/cfx_folderfontinfo.h
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/ge/cfx_folderfontinfo.h
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/ge/cfx_folderfontinfo.h')
-rw-r--r--core/fxge/ge/cfx_folderfontinfo.h5
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;
};