diff options
author | thestig <thestig@chromium.org> | 2016-05-23 16:55:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-23 16:55:09 -0700 |
commit | db1a24e86d40977fb6d8aa8fa57dadee4c2f1be1 (patch) | |
tree | e55123ef697226a15ccbb87f36bb52f5833a285d /fpdfsdk/fpdf_ext.cpp | |
parent | 27ddf161579f79510b361d0016ccc7f0cdffdc6d (diff) | |
download | pdfium-db1a24e86d40977fb6d8aa8fa57dadee4c2f1be1.tar.xz |
Remove dead code from CPDF_InterForm.
Clean up related code.
Review-Url: https://codereview.chromium.org/2003853003
Diffstat (limited to 'fpdfsdk/fpdf_ext.cpp')
-rw-r--r-- | fpdfsdk/fpdf_ext.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fpdfsdk/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp index 9bb54da594..350945e328 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 } |