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

Unified Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp

Issue 1417893003: Add type cast definitions for CPDF_Array. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 2 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
Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
index 3d9900deaca1860cc747d7fac3a57238b5c80397..23962612763c6564dd81d1c547cf0fb159c4e9ab 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
@@ -306,7 +306,7 @@ FX_BOOL CPDF_Document::IsContentUsedElsewhere(FX_DWORD objnum,
continue;
}
if (pContents->GetDirectType() == PDFOBJ_ARRAY) {
- CPDF_Array* pArray = (CPDF_Array*)pContents->GetDirect();
+ CPDF_Array* pArray = pContents->GetDirect()->AsArray();
for (FX_DWORD j = 0; j < pArray->GetCount(); j++) {
CPDF_Object* pRef = pArray->GetElement(j);
if (pRef == NULL || pRef->GetType() != PDFOBJ_REFERENCE) {
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698