Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2027)

Unified Diff: core/fpdfdoc/cpvt_fontmap.cpp

Issue 2510223002: Make CPDF_Dictionary use unique pointers. (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfdoc/cpdf_interform.cpp ('k') | core/fpdfdoc/cpvt_generateap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/cpvt_fontmap.cpp
diff --git a/core/fpdfdoc/cpvt_fontmap.cpp b/core/fpdfdoc/cpvt_fontmap.cpp
index a47595a6ac4862380c15eb1c8ce86631469a1bf7..283f60011b2d7bd30dbe14e726ce0d79816c1e5b 100644
--- a/core/fpdfdoc/cpvt_fontmap.cpp
+++ b/core/fpdfdoc/cpvt_fontmap.cpp
@@ -9,6 +9,7 @@
#include "core/fpdfapi/font/cpdf_font.h"
#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
+#include "core/fpdfapi/parser/cpdf_reference.h"
#include "core/fpdfdoc/cpdf_interform.h"
CPVT_FontMap::CPVT_FontMap(CPDF_Document* pDoc,
@@ -39,8 +40,8 @@ void CPVT_FontMap::GetAnnotSysPDFFont(CPDF_Document* pDoc,
CPDF_Dictionary* pFontList = pResDict->GetDictFor("Font");
if (pFontList && !pFontList->KeyExist(sSysFontAlias)) {
- pFontList->SetReferenceFor(sSysFontAlias, pDoc,
- pPDFFont->GetFontDict()->GetObjNum());
+ pFontList->SetNewFor<CPDF_Reference>(sSysFontAlias, pDoc,
+ pPDFFont->GetFontDict()->GetObjNum());
}
pSysFont = pPDFFont;
}
« no previous file with comments | « core/fpdfdoc/cpdf_interform.cpp ('k') | core/fpdfdoc/cpvt_generateap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698