From 6ee22ea9bba71054592fda2e3ed8d6f33045893e Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 8 May 2017 15:38:16 -0700 Subject: Remove downcast in cxfa_layoutpagemgr.cpp The cast is too strict for all of the objects to be processed, however all of the fields in use are present in a parent class to which these objects all belong. Bug: 718498 Change-Id: Ibe1d800c73215c36550e54bf18de90cc9d295ef9 Reviewed-on: https://pdfium-review.googlesource.com/5130 Reviewed-by: dsinclair Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_layoutpagemgr.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp index b88dca9009..5c94a6a256 100644 --- a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp +++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp @@ -1725,18 +1725,16 @@ void CXFA_LayoutPageMgr::MergePageSetContents() { break; } case XFA_Element::PageArea: { - CXFA_ContainerLayoutItem* pFormLayout = pContainerItem; + CXFA_LayoutItem* pFormLayout = pContainerItem; CXFA_Node* pParentNode = pContainerItem->m_pParent->m_pFormNode; bool bIsExistForm = true; for (int32_t iLevel = 0; iLevel < 3; iLevel++) { - pFormLayout = static_cast( - pFormLayout->m_pFirstChild); + pFormLayout = pFormLayout->m_pFirstChild; if (iLevel == 2) { while (pFormLayout && !XFA_ItemLayoutProcessor_IsTakingSpace( pFormLayout->m_pFormNode)) { - pFormLayout = static_cast( - pFormLayout->m_pNextSibling); + pFormLayout = pFormLayout->m_pNextSibling; } } if (!pFormLayout) { -- cgit v1.2.3