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

Unified Diff: fpdfsdk/src/fpdf_ext.cpp

Issue 1282653002: Remove dead code from CPDF_Metadata. Add missing nullptr check. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 4 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/src/fpdfdoc/doc_metadata.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdf_ext.cpp
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp
index e95a2f00947e8b8b7363e4759d8e9fddac90a0cc..2d84ff2a507231af0e0432d69333157dc57cd919 100644
--- a/fpdfsdk/src/fpdf_ext.cpp
+++ b/fpdfsdk/src/fpdf_ext.cpp
@@ -88,7 +88,7 @@ void CheckUnSupportAnnot(CPDF_Document* pDoc, CPDF_Annot* pPDFAnnot) {
}
}
-FX_BOOL CheckSharedForm(CXML_Element* pElement, CFX_ByteString cbName) {
+FX_BOOL CheckSharedForm(const CXML_Element* pElement, CFX_ByteString cbName) {
int count = pElement->CountAttrs();
int i = 0;
for (i = 0; i < count; i++) {
@@ -169,9 +169,8 @@ void CheckUnSupportError(CPDF_Document* pDoc, FX_DWORD err_code) {
}
// SharedForm
- CPDF_Metadata metaData;
- metaData.LoadDoc(pDoc);
- CXML_Element* pElement = metaData.GetRoot();
+ CPDF_Metadata metaData(pDoc);
+ const CXML_Element* pElement = metaData.GetRoot();
if (pElement)
CheckSharedForm(pElement, "workflowType");
« no previous file with comments | « core/src/fpdfdoc/doc_metadata.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698