From ec86c716f7efbeb9bf31fb22c95593114c5ed441 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 30 Jul 2018 17:38:21 +0000 Subject: 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 Reviewed-by: Ryan Harrison --- xfa/fxfa/parser/cxfa_document.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'xfa/fxfa/parser') 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) { -- cgit v1.2.3