Index: core/fpdfapi/font/cpdf_cidfont.cpp |
diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp |
index c6c6992562a356e5cfcd8a16807e59ee41fc2eef..e96f824bd5ed7cb1c93d62682ca5211387ef6292 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()); |