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

Unified Diff: core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp

Issue 1419643005: Merge to XFA: Add type cast definitions for CPDF_Array. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
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_page/fpdf_page_parser.cpp
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 6f186e6c3b7e9947d14eadb594ea410ea7b7c1ea..7aa2cf8aa3bb7a56e68923bf9741cae0eb734495 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -514,7 +514,7 @@ void _PDF_ReplaceAbbr(CPDF_Object* pObj) {
break;
}
case PDFOBJ_ARRAY: {
- CPDF_Array* pArray = (CPDF_Array*)pObj;
+ CPDF_Array* pArray = pObj->AsArray();
for (FX_DWORD i = 0; i < pArray->GetCount(); i++) {
CPDF_Object* pElement = pArray->GetElement(i);
if (pElement->IsName()) {
@@ -577,7 +577,7 @@ void _PDF_ReplaceFull(CPDF_Object* pObj) {
break;
}
case PDFOBJ_ARRAY: {
- CPDF_Array* pArray = (CPDF_Array*)pObj;
+ CPDF_Array* pArray = pObj->AsArray();
for (FX_DWORD i = 0; i < pArray->GetCount(); i++) {
CPDF_Object* pElement = pArray->GetElement(i);
if (pElement->IsName()) {

Powered by Google App Engine
This is Rietveld 408576698