diff options
author | tsepez <tsepez@chromium.org> | 2016-11-16 12:26:06 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-16 12:26:06 -0800 |
commit | 8a3aa459fc5284f51bcd7e98e95bf6214f47bb67 (patch) | |
tree | 13fb383936d679aded19054f4e7a0387dd52de76 /core/fpdfapi/font | |
parent | 14a60c50b10de1d9e4edd3629ea210a816940a75 (diff) | |
download | pdfium-8a3aa459fc5284f51bcd7e98e95bf6214f47bb67.tar.xz |
Make CPDF_Array take unique_ptrs
BUG=
Review-Url: https://codereview.chromium.org/2498223005
Diffstat (limited to 'core/fpdfapi/font')
-rw-r--r-- | core/fpdfapi/font/cpdf_fontencoding.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/font/cpdf_fontencoding.cpp b/core/fpdfapi/font/cpdf_fontencoding.cpp index fba35a1062..3537330def 100644 --- a/core/fpdfapi/font/cpdf_fontencoding.cpp +++ b/core/fpdfapi/font/cpdf_fontencoding.cpp @@ -1703,11 +1703,11 @@ CPDF_Object* CPDF_FontEncoding::Realize(CFX_WeakPtr<CFX_ByteStringPool> pPool) { PDF_UnicodesForPredefinedCharSet(PDFFONT_ENCODING_WINANSI); CPDF_Array* pDiff = new CPDF_Array; for (int i = 0; i < 256; i++) { - if (pStandard[i] == m_Unicodes[i]) { + if (pStandard[i] == m_Unicodes[i]) continue; - } - pDiff->Add(new CPDF_Number(i)); - pDiff->Add(new CPDF_Name(PDF_AdobeNameFromUnicode(m_Unicodes[i]))); + + pDiff->AddNew<CPDF_Number>(i); + pDiff->AddNew<CPDF_Name>(PDF_AdobeNameFromUnicode(m_Unicodes[i])); } CPDF_Dictionary* pDict = new CPDF_Dictionary(pPool); |