From 03d9180f30f2ba79ef48b4003306224428f4ad47 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 20 Nov 2017 20:28:43 +0000 Subject: Remove return value from SetAttributeValue The CJX_Node::SetAttributeValue method always returns |true| and we never check the value. This CL changes the method to return |void| instead. Change-Id: Ia3162627dee926d602e7ffe74f9dca2c1fd81ca8 Reviewed-on: https://pdfium-review.googlesource.com/18770 Reviewed-by: Henrique Nakashima Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- fxjs/cjx_node.cpp | 5 ++--- fxjs/cjx_node.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/fxjs/cjx_node.cpp b/fxjs/cjx_node.cpp index ba55086261..bf8c1f726e 100644 --- a/fxjs/cjx_node.cpp +++ b/fxjs/cjx_node.cpp @@ -3165,7 +3165,7 @@ bool CJX_Node::SetCData(XFA_Attribute eAttr, return true; } -bool CJX_Node::SetAttributeValue(const WideString& wsValue, +void CJX_Node::SetAttributeValue(const WideString& wsValue, const WideString& wsXMLValue, bool bNotify, bool bScriptModify) { @@ -3176,7 +3176,7 @@ bool CJX_Node::SetAttributeValue(const WideString& wsValue, SetUserData(pKey, pClone, &deleteWideStringCallBack); OnChanged(XFA_Attribute::Value, bNotify, bScriptModify); if (!GetXFANode()->IsNeedSavingXMLNode()) - return true; + return; auto* elem = static_cast(GetXFANode()->GetXMLMappingNode()); FX_XMLNODETYPE eXMLType = elem->GetType(); @@ -3211,7 +3211,6 @@ bool CJX_Node::SetAttributeValue(const WideString& wsValue, default: ASSERT(0); } - return true; } pdfium::Optional CJX_Node::TryCData(XFA_Attribute eAttr, diff --git a/fxjs/cjx_node.h b/fxjs/cjx_node.h index d0f8279e7f..148f1a6378 100644 --- a/fxjs/cjx_node.h +++ b/fxjs/cjx_node.h @@ -59,7 +59,7 @@ class CJX_Node : public CJX_Object { pdfium::Optional TryAttribute(XFA_Attribute eAttr, bool bUseDefault); - bool SetAttributeValue(const WideString& wsValue, + void SetAttributeValue(const WideString& wsValue, const WideString& wsXMLValue, bool bNotify, bool bScriptModify); -- cgit v1.2.3