| Index: core/fpdfapi/font/cpdf_fontencoding.cpp
|
| diff --git a/core/fpdfapi/font/cpdf_fontencoding.cpp b/core/fpdfapi/font/cpdf_fontencoding.cpp
|
| index da607e6aa8e404acf9dc20c8a1dd7b3149a8e380..1d13f840ee28972d2a57a1762144d155de96db26 100644
|
| --- a/core/fpdfapi/font/cpdf_fontencoding.cpp
|
| +++ b/core/fpdfapi/font/cpdf_fontencoding.cpp
|
| @@ -1701,7 +1701,7 @@ CPDF_Object* CPDF_FontEncoding::Realize(CFX_WeakPtr<CFX_ByteStringPool> pPool) {
|
| }
|
| const uint16_t* pStandard =
|
| PDF_UnicodesForPredefinedCharSet(PDFFONT_ENCODING_WINANSI);
|
| - CPDF_Array* pDiff = new CPDF_Array;
|
| + auto pDiff = pdfium::MakeUnique<CPDF_Array>();
|
| for (int i = 0; i < 256; i++) {
|
| if (pStandard[i] == m_Unicodes[i])
|
| continue;
|
| @@ -1711,8 +1711,8 @@ CPDF_Object* CPDF_FontEncoding::Realize(CFX_WeakPtr<CFX_ByteStringPool> pPool) {
|
| }
|
|
|
| CPDF_Dictionary* pDict = new CPDF_Dictionary(pPool);
|
| - pDict->SetNameFor("BaseEncoding", "WinAnsiEncoding");
|
| - pDict->SetFor("Differences", pDiff);
|
| + pDict->SetNewFor<CPDF_Name>("BaseEncoding", "WinAnsiEncoding");
|
| + pDict->SetFor("Differences", std::move(pDiff));
|
| return pDict;
|
| }
|
|
|
|
|