summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_cidfont.h
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2017-01-19 06:56:13 -0800
committerCommit bot <commit-bot@chromium.org>2017-01-19 06:56:13 -0800
commitdd533baad22f5143c093b98e98463a0dc62899ea (patch)
treee5704fa1f4a8e08109d7d42d10b77a2eb8826e35 /core/fpdfapi/font/cpdf_cidfont.h
parente6cf01356e3336dc4f0717a391d9067693a418c1 (diff)
downloadpdfium-dd533baad22f5143c093b98e98463a0dc62899ea.tar.xz
use unique_ptr in fpdf_font_cid.cpp
Also return CFX_MaybeOwned<> from functions so to make cleanup automatic, avoiding a theoretical leak. Review-Url: https://codereview.chromium.org/2641853004
Diffstat (limited to 'core/fpdfapi/font/cpdf_cidfont.h')
-rw-r--r--core/fpdfapi/font/cpdf_cidfont.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/font/cpdf_cidfont.h b/core/fpdfapi/font/cpdf_cidfont.h
index ae3be3908f..79ec7cbb35 100644
--- a/core/fpdfapi/font/cpdf_cidfont.h
+++ b/core/fpdfapi/font/cpdf_cidfont.h
@@ -11,6 +11,7 @@
#include <vector>
#include "core/fpdfapi/font/cpdf_font.h"
+#include "core/fxcrt/cfx_maybe_owned.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
@@ -71,8 +72,7 @@ class CPDF_CIDFont : public CPDF_Font {
void LoadSubstFont();
FX_WCHAR GetUnicodeFromCharCode(uint32_t charcode) const;
- CPDF_CMap* m_pCMap;
- std::unique_ptr<CPDF_CMap> m_pAllocatedCMap;
+ CFX_MaybeOwned<CPDF_CMap> m_pCMap;
CPDF_CID2UnicodeMap* m_pCID2UnicodeMap;
CIDSet m_Charset;
bool m_bType1;