From b6853cfe4fd1ee089dfdd0cb09bbc4063532ef82 Mon Sep 17 00:00:00 2001 From: tsepez Date: Mon, 25 Apr 2016 11:23:43 -0700 Subject: Pass CFX_*StringCs to FX_HashCode_GETA and _GETW hash functions. Too many calls were of the form fn(x.c_str(), x.GetLength()) which is an anti-pattern given the StringC classes which tie these together. There are a few places where explicit CFX_*StringCs are constructed, but this can be avoided by changing the args to these functions in the same manner. Removed String_ from name of functions since it added little value. Also removed default argument. Review URL: https://codereview.chromium.org/1919563002 --- xfa/fxfa/parser/xfa_script_nodehelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xfa/fxfa/parser/xfa_script_nodehelper.cpp') diff --git a/xfa/fxfa/parser/xfa_script_nodehelper.cpp b/xfa/fxfa/parser/xfa_script_nodehelper.cpp index 96ae98aeaf..96ecc5a125 100644 --- a/xfa/fxfa/parser/xfa_script_nodehelper.cpp +++ b/xfa/fxfa/parser/xfa_script_nodehelper.cpp @@ -33,7 +33,7 @@ CXFA_Node* CXFA_NodeHelper::XFA_ResolveNodes_GetOneChild( return NULL; } CXFA_NodeArray siblings; - uint32_t uNameHash = FX_HashCode_String_GetW(pwsName, FXSYS_wcslen(pwsName)); + uint32_t uNameHash = FX_HashCode_GetW(CFX_WideStringC(pwsName), false); XFA_NodeAcc_TraverseAnySiblings(parent, uNameHash, &siblings, bIsClassName); if (siblings.GetSize() == 0) { return NULL; -- cgit v1.2.3