diff options
author | weili <weili@chromium.org> | 2016-07-25 07:40:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-25 07:40:27 -0700 |
commit | 9b671ace8aec906683b05399cf8a2882ed8ef7b6 (patch) | |
tree | ca6193f08a18ffe917301fd523c6c668becb7bdb /core/fpdfapi/fpdf_font/cpdf_type3font.h | |
parent | d780735def22c4c2ec3a0cc89856c86486c25494 (diff) | |
download | pdfium-9b671ace8aec906683b05399cf8a2882ed8ef7b6.tar.xz |
Use smart pointers for CFX_Font and CFX_Type3Font classes
For the class owned member variables, use std::unique_ptr or
std::vector for memory management.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2169793002
Diffstat (limited to 'core/fpdfapi/fpdf_font/cpdf_type3font.h')
-rw-r--r-- | core/fpdfapi/fpdf_font/cpdf_type3font.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/fpdfapi/fpdf_font/cpdf_type3font.h b/core/fpdfapi/fpdf_font/cpdf_type3font.h index 70992c9c8c..c5e99534e0 100644 --- a/core/fpdfapi/fpdf_font/cpdf_type3font.h +++ b/core/fpdfapi/fpdf_font/cpdf_type3font.h @@ -8,6 +8,7 @@ #define CORE_FPDFAPI_FPDF_FONT_CPDF_TYPE3FONT_H_ #include <map> +#include <memory> #include "core/fpdfapi/fpdf_font/cpdf_simplefont.h" #include "core/fxcrt/include/fx_coordinates.h" @@ -50,7 +51,7 @@ class CPDF_Type3Font : public CPDF_SimpleFont { CPDF_Dictionary* m_pCharProcs; CPDF_Dictionary* m_pPageResources; CPDF_Dictionary* m_pFontResources; - std::map<uint32_t, CPDF_Type3Char*> m_CacheMap; + std::map<uint32_t, std::unique_ptr<CPDF_Type3Char>> m_CacheMap; }; #endif // CORE_FPDFAPI_FPDF_FONT_CPDF_TYPE3FONT_H_ |