diff options
author | Lei Zhang <thestig@chromium.org> | 2018-07-30 17:38:21 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-30 17:38:21 +0000 |
commit | ec86c716f7efbeb9bf31fb22c95593114c5ed441 (patch) | |
tree | 1757aa84a7a822e7fbbee6192f9201feb29a7638 /xfa | |
parent | 95121b79bfc0030bf4791be616df860a3e447716 (diff) | |
download | pdfium-ec86c716f7efbeb9bf31fb22c95593114c5ed441.tar.xz |
Remove a NOTREACHED() in FormValueNode_SetChildContent().
It is reachable, and the action is currently a no-op, so let it be. Also
change FormValueNode_SetChildContent() to return void since no caller
checks the return value. Remove its default argument, since all the
callers set it.
Change-Id: I742ca2d936872a3b3d609c178321199abc06546c
Reviewed-on: https://pdfium-review.googlesource.com/39115
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r-- | xfa/fxfa/parser/cxfa_document.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp index 3b086faf69..4d51c0b0b8 100644 --- a/xfa/fxfa/parser/cxfa_document.cpp +++ b/xfa/fxfa/parser/cxfa_document.cpp @@ -86,16 +86,16 @@ CXFA_Node* FormValueNode_CreateChild(CXFA_Node* pValueNode, XFA_Element iType) { return pChildNode; } -bool FormValueNode_SetChildContent(CXFA_Node* pValueNode, +void FormValueNode_SetChildContent(CXFA_Node* pValueNode, const WideString& wsContent, - XFA_Element iType = XFA_Element::Unknown) { + XFA_Element iType) { if (!pValueNode) - return false; + return; ASSERT(pValueNode->GetPacketType() == XFA_PacketType::Form); CXFA_Node* pChildNode = FormValueNode_CreateChild(pValueNode, iType); if (!pChildNode) - return false; + return; switch (pChildNode->GetObjectType()) { case XFA_ObjectType::ContentNode: { @@ -128,10 +128,8 @@ bool FormValueNode_SetChildContent(CXFA_Node* pValueNode, break; } default: - NOTREACHED(); break; } - return true; } void MergeNodeRecurse(CXFA_Node* pDestNodeParent, CXFA_Node* pProtoNode) { |