From 2b11dc1220746d2f6f97a940fc9e4235c8ed4975 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 22 Oct 2015 15:02:06 -0400 Subject: Merge to XFA: Add type cast definitions for CPDF_Array. This Cl adds ToArray, CPDF_Object::AsArray and CPDF_Object::IsArray and updates the src to use them as needed. BUG=pdfium:201 R=thestig@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1417893003 . (cherry picked from commit c2bfc000e502c42c9a3017038fd9104c7997d126) Review URL: https://codereview.chromium.org/1419643005 . --- core/src/fpdfapi/fpdf_render/fpdf_render.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core/src/fpdfapi/fpdf_render/fpdf_render.cpp') diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp index 99835a3b94..7b37b1b9bd 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp @@ -1225,9 +1225,8 @@ CPDF_TransferFunc* CPDF_DocRenderData::GetTransferFunc(CPDF_Object* pObj) { CPDF_Function* pFuncs[3] = {nullptr, nullptr, nullptr}; FX_BOOL bUniTransfer = TRUE; FX_BOOL bIdentity = TRUE; - if (pObj->GetType() == PDFOBJ_ARRAY) { + if (CPDF_Array* pArray = pObj->AsArray()) { bUniTransfer = FALSE; - CPDF_Array* pArray = (CPDF_Array*)pObj; if (pArray->GetCount() < 3) return nullptr; -- cgit v1.2.3