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

Unified Diff: fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.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 | « fpdfsdk/fpdfview.cpp ('k') | fpdfsdk/javascript/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index 26227c068e79608b57d90ecf57cfb3b0f66795ef..9bb14183798f5a960484c42c914085c51aeebcec 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -6,6 +6,8 @@
#include "fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h"
+#include <memory>
+
#include "core/fpdfapi/parser/cpdf_array.h"
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
#include "core/fpdfapi/parser/cpdf_string.h"
@@ -398,7 +400,7 @@ void CPDFXFA_DocEnvironment::SetTitle(CXFA_FFDoc* hDoc,
return;
if (CPDF_Dictionary* pInfoDict = m_pContext->GetPDFDoc()->GetInfo())
- pInfoDict->SetFor("Title", new CPDF_String(wsTitle));
+ pInfoDict->SetNewFor<CPDF_String>("Title", wsTitle);
}
void CPDFXFA_DocEnvironment::ExportData(CXFA_FFDoc* hDoc,
« no previous file with comments | « fpdfsdk/fpdfview.cpp ('k') | fpdfsdk/javascript/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698