diff options
Diffstat (limited to 'core/fpdfapi/font/cpdf_cidfont.cpp')
-rw-r--r-- | core/fpdfapi/font/cpdf_cidfont.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp index c6c6992562..e96f824bd5 100644 --- a/core/fpdfapi/font/cpdf_cidfont.cpp +++ b/core/fpdfapi/font/cpdf_cidfont.cpp @@ -200,8 +200,7 @@ bool IsMetricForCID(const uint32_t* pEntry, uint16_t CID) { } // namespace CPDF_CIDFont::CPDF_CIDFont() - : m_pCMap(nullptr), - m_pCID2UnicodeMap(nullptr), + : m_pCID2UnicodeMap(nullptr), m_bCIDIsGID(false), m_bAnsiWidthsFixed(false), m_bAdobeCourierStd(false) { @@ -360,8 +359,7 @@ bool CPDF_CIDFont::Load() { if (!m_pCMap) return false; } else if (CPDF_Stream* pStream = pEncoding->AsStream()) { - m_pCMap = new CPDF_CMap; - m_pAllocatedCMap.reset(m_pCMap); + m_pCMap = pdfium::MakeUnique<CPDF_CMap>(); CPDF_StreamAcc acc; acc.LoadAllData(pStream, false); m_pCMap->LoadEmbedded(acc.GetData(), acc.GetSize()); |