summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_object_imp.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-06-23 13:34:10 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-23 13:34:10 -0700
commitb97784706ec898ff6b1c36f1564c0c66f9419b17 (patch)
tree679a8602c52caee9efb7746f273b0959843c3be1 /xfa/fxfa/parser/xfa_object_imp.cpp
parent85d1f2c2f9f1e746bedb1b6f03576613f54fbc27 (diff)
downloadpdfium-b97784706ec898ff6b1c36f1564c0c66f9419b17.tar.xz
Pass needed value to CXFA_Node constructor
Currently the CXFA_Node constructor will call out to lookup the object type for a given element type. There is only one called of this constructor and it already has the object type so just pass it through instead of getting the element data a second time. Review-Url: https://codereview.chromium.org/2092853002
Diffstat (limited to 'xfa/fxfa/parser/xfa_object_imp.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_object_imp.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp
index 28c56ce0f3..04b33b47c9 100644
--- a/xfa/fxfa/parser/xfa_object_imp.cpp
+++ b/xfa/fxfa/parser/xfa_object_imp.cpp
@@ -43,10 +43,6 @@ void XFA_CopyWideString(void*& pData) {
XFA_MAPDATABLOCKCALLBACKINFO deleteWideStringCallBack = {XFA_DeleteWideString,
XFA_CopyWideString};
-XFA_ObjectType XFA_GetElementObjectType(XFA_Element eType) {
- return XFA_GetElementByID(eType)->eObjectType;
-}
-
void XFA_DataNodeDeleteBindItem(void* pData) {
delete static_cast<CXFA_NodeArray*>(pData);
}
@@ -108,8 +104,11 @@ XFA_MAPMODULEDATA::XFA_MAPMODULEDATA() {}
XFA_MAPMODULEDATA::~XFA_MAPMODULEDATA() {}
-CXFA_Node::CXFA_Node(CXFA_Document* pDoc, uint16_t ePacket, XFA_Element eType)
- : CXFA_Object(pDoc, XFA_GetElementObjectType(eType), eType),
+CXFA_Node::CXFA_Node(CXFA_Document* pDoc,
+ uint16_t ePacket,
+ XFA_ObjectType oType,
+ XFA_Element eType)
+ : CXFA_Object(pDoc, oType, eType),
m_pNext(nullptr),
m_pChild(nullptr),
m_pLastChild(nullptr),