Remove unused compound return from CJX_Object::GetPropertyInternal(). Change-Id: I97fa07067ca11ffacea32157eb543a53c5ea7af8 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/94351 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp index 1449cab..b02bd3a 100644 --- a/fxjs/xfa/cjx_object.cpp +++ b/fxjs/xfa/cjx_object.cpp
@@ -8,6 +8,7 @@ #include <set> #include <tuple> +#include <utility> #include "core/fxcrt/fx_extension.h" #include "core/fxcrt/fx_memory.h" @@ -784,10 +785,9 @@ return element->GetNamespaceURI(); } -std::pair<CXFA_Node*, int32_t> CJX_Object::GetPropertyInternal( - int32_t index, - XFA_Element eProperty) const { - return GetXFANode()->GetProperty(index, eProperty); +CXFA_Node* CJX_Object::GetPropertyInternal(int32_t index, + XFA_Element eProperty) const { + return GetXFANode()->GetProperty(index, eProperty).first; } CXFA_Node* CJX_Object::GetOrCreatePropertyInternal(int32_t index,
diff --git a/fxjs/xfa/cjx_object.h b/fxjs/xfa/cjx_object.h index a8d47f7..060d41c 100644 --- a/fxjs/xfa/cjx_object.h +++ b/fxjs/xfa/cjx_object.h
@@ -9,7 +9,6 @@ #include <map> #include <memory> -#include <utility> #include <vector> #include "core/fxcrt/widestring.h" @@ -144,10 +143,7 @@ template <typename T> T* GetProperty(int32_t index, XFA_Element eType) const { - CXFA_Node* node; - int32_t count; - std::tie(node, count) = GetPropertyInternal(index, eType); - return static_cast<T*>(node); + return static_cast<T*>(GetPropertyInternal(index, eType)); } template <typename T> T* GetOrCreateProperty(int32_t index, XFA_Element eType) { @@ -248,8 +244,7 @@ using Type__ = CJX_Object; static const TypeTag static_type__ = TypeTag::Object; - std::pair<CXFA_Node*, int32_t> GetPropertyInternal(int32_t index, - XFA_Element eType) const; + CXFA_Node* GetPropertyInternal(int32_t index, XFA_Element eType) const; CXFA_Node* GetOrCreatePropertyInternal(int32_t index, XFA_Element eType); void OnChanging(XFA_Attribute eAttr);