From 51ef4a6ca3b4ae9b618cb1c96f84697a2bf4a2b1 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 14 Dec 2017 20:43:53 +0000 Subject: Change CXFA_Node::GetChild to return proper types Currently CXFA_Node::GetChild always returns a CXFA_Node* object. We know the type we want when we call GetChild, so this CL changes the code to add a template parameter to GetChild and return the correct CXFA_Node subtype for the desired element. Change-Id: I5aecf2e840504235dc246483abee48e0564841fe Reviewed-on: https://pdfium-review.googlesource.com/21210 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_strokedata.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xfa/fxfa/parser/cxfa_strokedata.cpp') diff --git a/xfa/fxfa/parser/cxfa_strokedata.cpp b/xfa/fxfa/parser/cxfa_strokedata.cpp index 96d2866c37..4c4e810555 100644 --- a/xfa/fxfa/parser/cxfa_strokedata.cpp +++ b/xfa/fxfa/parser/cxfa_strokedata.cpp @@ -6,6 +6,7 @@ #include "xfa/fxfa/parser/cxfa_strokedata.h" +#include "xfa/fxfa/parser/cxfa_color.h" #include "xfa/fxfa/parser/cxfa_measurement.h" #include "xfa/fxfa/parser/cxfa_node.h" #include "xfa/fxfa/parser/xfa_utils.h" @@ -51,7 +52,8 @@ FX_ARGB CXFA_StrokeData::GetColor() const { if (!m_pNode) return 0xFF000000; - CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Color, false); + CXFA_Color* pNode = + m_pNode->GetChild(0, XFA_Element::Color, false); if (!pNode) return 0xFF000000; -- cgit v1.2.3