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

Unified Diff: core/src/fpdfapi/fpdf_render/fpdf_render.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_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 99835a3b94daa71eacf296082701898bd5b65622..7b37b1b9bd5a6ff40dabdc629821283976dce3fe 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;

Powered by Google App Engine
This is Rietveld 408576698