diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-12-04 18:20:07 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-12-04 18:20:07 +0000 |
commit | 9256ad5784fc437f60fbeb836fe2ecd18e028a5d (patch) | |
tree | 484d9e9c4697d50800c574b58d5db4cfa349b27c /fxjs/cjx_hostpseudomodel.cpp | |
parent | 76e336d26e78f6c6b5cdede6bb4b94ebddf3a2b1 (diff) | |
download | pdfium-9256ad5784fc437f60fbeb836fe2ecd18e028a5d.tar.xz |
Cleanup ResolveObjects params and return
The return value of ResolveObjects is always used as a boolean, so
change from int32_t. The XFA_RESOLVENODE_RS object was made a pointer
from a ref.
Change-Id: I030036c01101680e36f4ddf524b468354a2e6850
Reviewed-on: https://pdfium-review.googlesource.com/20331
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cjx_hostpseudomodel.cpp')
-rw-r--r-- | fxjs/cjx_hostpseudomodel.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fxjs/cjx_hostpseudomodel.cpp b/fxjs/cjx_hostpseudomodel.cpp index 0e26a19048..8838c891d9 100644 --- a/fxjs/cjx_hostpseudomodel.cpp +++ b/fxjs/cjx_hostpseudomodel.cpp @@ -283,10 +283,10 @@ void CJX_HostPseudoModel::OpenList(CFXJSE_Arguments* pArguments) { uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; XFA_RESOLVENODE_RS resolveNodeRS; - int32_t iRet = pScriptContext->ResolveObjects( - pObject, pValue->ToWideString().AsStringView(), resolveNodeRS, - dwFlag); - if (iRet < 1 || !resolveNodeRS.objects.front()->IsNode()) + bool iRet = pScriptContext->ResolveObjects( + pObject, pValue->ToWideString().AsStringView(), &resolveNodeRS, + dwFlag, nullptr); + if (!iRet || !resolveNodeRS.objects.front()->IsNode()) return; pNode = resolveNodeRS.objects.front()->AsNode(); @@ -387,9 +387,9 @@ void CJX_HostPseudoModel::ResetData(CFXJSE_Arguments* pArguments) { uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; XFA_RESOLVENODE_RS resolveNodeRS; - int32_t iRet = pScriptContext->ResolveObjects( - pObject, wsName.AsStringView(), resolveNodeRS, dwFlag); - if (iRet < 1 || !resolveNodeRS.objects.front()->IsNode()) + bool iRet = pScriptContext->ResolveObjects(pObject, wsName.AsStringView(), + &resolveNodeRS, dwFlag, nullptr); + if (!iRet || !resolveNodeRS.objects.front()->IsNode()) continue; pNode = resolveNodeRS.objects.front()->AsNode(); @@ -451,10 +451,10 @@ void CJX_HostPseudoModel::SetFocus(CFXJSE_Arguments* pArguments) { uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; XFA_RESOLVENODE_RS resolveNodeRS; - int32_t iRet = pScriptContext->ResolveObjects( - pObject, pValue->ToWideString().AsStringView(), resolveNodeRS, - dwFlag); - if (iRet < 1 || !resolveNodeRS.objects.front()->IsNode()) + bool iRet = pScriptContext->ResolveObjects( + pObject, pValue->ToWideString().AsStringView(), &resolveNodeRS, + dwFlag, nullptr); + if (!iRet || !resolveNodeRS.objects.front()->IsNode()) return; pNode = resolveNodeRS.objects.front()->AsNode(); |