summaryrefslogtreecommitdiff
path: root/core/fxge/android/cfpf_skiafontmgr.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-08-17 20:44:22 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-17 20:44:22 +0000
commitcffa651acfa7ca1d90aecea728e94c5c3dcdfe79 (patch)
tree11f2db075105c99e6967a5476d3803739092fb96 /core/fxge/android/cfpf_skiafontmgr.h
parent16208a0ef769a84c7e96ff5d55a16637ca01de03 (diff)
downloadpdfium-cffa651acfa7ca1d90aecea728e94c5c3dcdfe79.tar.xz
Change CFPF_SkiaFontMgr::m_FontFaces to store unique_ptrs.
Instead of raw pointers. Change-Id: Ie46af37bbe3fe287bdff25249afaeb90589c85b3 Reviewed-on: https://pdfium-review.googlesource.com/40552 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge/android/cfpf_skiafontmgr.h')
-rw-r--r--core/fxge/android/cfpf_skiafontmgr.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/fxge/android/cfpf_skiafontmgr.h b/core/fxge/android/cfpf_skiafontmgr.h
index af2d3acfc8..99aafd7bd2 100644
--- a/core/fxge/android/cfpf_skiafontmgr.h
+++ b/core/fxge/android/cfpf_skiafontmgr.h
@@ -8,6 +8,7 @@
#define CORE_FXGE_ANDROID_CFPF_SKIAFONTMGR_H_
#include <map>
+#include <memory>
#include <vector>
#include "core/fxcrt/fx_string.h"
@@ -35,11 +36,12 @@ class CFPF_SkiaFontMgr {
private:
void ScanPath(const ByteString& path);
void ScanFile(const ByteString& file);
- void ReportFace(FXFT_Face face, CFPF_SkiaPathFont* pFont);
+ std::unique_ptr<CFPF_SkiaPathFont> ReportFace(FXFT_Face face,
+ const ByteString& file);
bool m_bLoaded = false;
FXFT_Library m_FTLibrary = nullptr;
- std::vector<CFPF_SkiaPathFont*> m_FontFaces;
+ std::vector<std::unique_ptr<CFPF_SkiaPathFont>> m_FontFaces;
std::map<uint32_t, CFPF_SkiaFont*> m_FamilyFonts;
};