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

Unified Diff: fpdfsdk/fpdf_ext.cpp

Issue 2003853003: Remove dead code from CPDF_InterForm. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 7 months 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/include/fpdf_doc.h ('k') | fpdfsdk/fpdfformfill.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdf_ext.cpp
diff --git a/fpdfsdk/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp
index 9bb54da59408030377e468bed078bf6c0ea5290f..350945e3287e594f73d65c24f9f5435aae53a9c4 100644
--- a/fpdfsdk/fpdf_ext.cpp
+++ b/fpdfsdk/fpdf_ext.cpp
@@ -6,6 +6,8 @@
#include "public/fpdf_ext.h"
+#include <memory>
+
#include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
#include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
#include "core/fpdfapi/include/cpdf_modulemgr.h"
@@ -20,13 +22,13 @@
class CFSDK_UnsupportInfo_Adapter {
public:
- CFSDK_UnsupportInfo_Adapter(UNSUPPORT_INFO* unsp_info) {
- m_unsp_info = unsp_info;
- }
+ explicit CFSDK_UnsupportInfo_Adapter(UNSUPPORT_INFO* unsp_info)
+ : m_unsp_info(unsp_info) {}
+
void ReportError(int nErrorType);
private:
- UNSUPPORT_INFO* m_unsp_info;
+ UNSUPPORT_INFO* const m_unsp_info;
};
void CFSDK_UnsupportInfo_Adapter::ReportError(int nErrorType) {
@@ -183,11 +185,9 @@ void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code) {
#ifndef PDF_ENABLE_XFA
// XFA Forms
- CPDF_InterForm* pInterForm = new CPDF_InterForm(pDoc, FALSE);
- if (pInterForm->HasXFAForm()) {
+ CPDF_InterForm interform(pDoc);
+ if (interform.HasXFAForm())
FPDF_UnSupportError(FPDF_UNSP_DOC_XFAFORM);
- }
- delete pInterForm;
#endif // PDF_ENABLE_XFA
}
« no previous file with comments | « core/fpdfdoc/include/fpdf_doc.h ('k') | fpdfsdk/fpdfformfill.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698