summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_utils.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-27 19:36:26 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-27 19:36:26 +0000
commit9a48fd1aabf105b168f5d8fc26549ae0d41d002e (patch)
tree846dd27b25365fa1fcb3b9c7a66574f1b5ae166f /xfa/fxfa/parser/xfa_utils.cpp
parente6ccf2578ae04c796a69f3596e4b4730a45da378 (diff)
downloadpdfium-9a48fd1aabf105b168f5d8fc26549ae0d41d002e.tar.xz
Fold XFA_GetAttributeByName into CXFA_Node::NameToAttribute
This CL removes the xfa_utils helper and does the work directly in CXFA_Node. Change-Id: I4f7cac9cb6d2a53ac5627f50a2f066f79fc22a31 Reviewed-on: https://pdfium-review.googlesource.com/19290 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/xfa_utils.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_utils.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp
index 03b8943a1f..7fb5ff573d 100644
--- a/xfa/fxfa/parser/xfa_utils.cpp
+++ b/xfa/fxfa/parser/xfa_utils.cpp
@@ -268,21 +268,6 @@ bool XFA_GetAttributeDefaultValue(void*& pValue,
return false;
}
-const XFA_ATTRIBUTEINFO* XFA_GetAttributeByName(const WideStringView& wsName) {
- if (wsName.IsEmpty())
- return nullptr;
-
- auto* it = std::lower_bound(g_XFAAttributeData,
- g_XFAAttributeData + g_iXFAAttributeCount,
- FX_HashCode_GetW(wsName, false),
- [](const XFA_ATTRIBUTEINFO& arg, uint32_t hash) {
- return arg.uHash < hash;
- });
- if (it != g_XFAAttributeData + g_iXFAAttributeCount && wsName == it->pName)
- return it;
- return nullptr;
-}
-
const XFA_ATTRIBUTEINFO* XFA_GetAttributeByID(XFA_Attribute eName) {
ASSERT(static_cast<uint8_t>(eName) < g_iXFAAttributeCount);
return g_XFAAttributeData + static_cast<uint8_t>(eName);