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

Unified Diff: core/src/fpdfapi/fpdf_render/fpdf_render.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_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 cb5450f913bb9668a9fbb63be83dab5fb9024fea..ccc8ce63cf164c73c2cbfa25797a8f1b80a01864 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -1224,9 +1224,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;
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp ('k') | core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698