From 71803d230109cb841a323c579082a5cbd6fcbe3c Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 20 Nov 2017 20:28:53 +0000 Subject: Cleanup CXFA_{ExData|Image}Data Setter returns. This CL changes the Set methods from {ExData|Image}Data which return bool but the return value is never used to return void instead. Change-Id: I0b6aa40e27839ffca21fdbcd6635d5a6224377e9 Reviewed-on: https://pdfium-review.googlesource.com/18790 Reviewed-by: Henrique Nakashima Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_exdatadata.cpp | 6 +++--- xfa/fxfa/parser/cxfa_exdatadata.h | 2 +- xfa/fxfa/parser/cxfa_imagedata.cpp | 26 +++++++++++++------------- xfa/fxfa/parser/cxfa_imagedata.h | 6 +++--- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/xfa/fxfa/parser/cxfa_exdatadata.cpp b/xfa/fxfa/parser/cxfa_exdatadata.cpp index 4b62867b16..7508ba8584 100644 --- a/xfa/fxfa/parser/cxfa_exdatadata.cpp +++ b/xfa/fxfa/parser/cxfa_exdatadata.cpp @@ -10,7 +10,7 @@ CXFA_ExDataData::CXFA_ExDataData(CXFA_Node* pNode) : CXFA_DataData(pNode) {} -bool CXFA_ExDataData::SetContentType(const WideString& wsContentType) { - return m_pNode->JSNode()->SetCData(XFA_Attribute::ContentType, wsContentType, - false, false); +void CXFA_ExDataData::SetContentType(const WideString& wsContentType) { + m_pNode->JSNode()->SetCData(XFA_Attribute::ContentType, wsContentType, false, + false); } diff --git a/xfa/fxfa/parser/cxfa_exdatadata.h b/xfa/fxfa/parser/cxfa_exdatadata.h index 3f9468a809..0def98b92a 100644 --- a/xfa/fxfa/parser/cxfa_exdatadata.h +++ b/xfa/fxfa/parser/cxfa_exdatadata.h @@ -16,7 +16,7 @@ class CXFA_ExDataData : public CXFA_DataData { public: explicit CXFA_ExDataData(CXFA_Node* pNode); - bool SetContentType(const WideString& wsContentType); + void SetContentType(const WideString& wsContentType); }; #endif // XFA_FXFA_PARSER_CXFA_EXDATADATA_H_ diff --git a/xfa/fxfa/parser/cxfa_imagedata.cpp b/xfa/fxfa/parser/cxfa_imagedata.cpp index 7888c34205..145d3586a5 100644 --- a/xfa/fxfa/parser/cxfa_imagedata.cpp +++ b/xfa/fxfa/parser/cxfa_imagedata.cpp @@ -61,23 +61,23 @@ bool CXFA_ImageData::GetContent(WideString& wsText) { return true; } -bool CXFA_ImageData::SetContentType(const WideString& wsContentType) { - return m_pNode->JSNode()->SetCData(XFA_Attribute::ContentType, wsContentType, - false, false); +void CXFA_ImageData::SetContentType(const WideString& wsContentType) { + m_pNode->JSNode()->SetCData(XFA_Attribute::ContentType, wsContentType, false, + false); } -bool CXFA_ImageData::SetHref(const WideString& wsHref) { - if (m_bDefValue) - return m_pNode->JSNode()->SetCData(XFA_Attribute::Href, wsHref, false, - false); - return m_pNode->JSNode()->SetAttribute(XFA_Attribute::Href, - wsHref.AsStringView(), false); +void CXFA_ImageData::SetHref(const WideString& wsHref) { + if (m_bDefValue) { + m_pNode->JSNode()->SetCData(XFA_Attribute::Href, wsHref, false, false); + return; + } + m_pNode->JSNode()->SetAttribute(XFA_Attribute::Href, wsHref.AsStringView(), + false); } -bool CXFA_ImageData::SetTransferEncoding(XFA_ATTRIBUTEENUM iTransferEncoding) { +void CXFA_ImageData::SetTransferEncoding(XFA_ATTRIBUTEENUM iTransferEncoding) { if (m_bDefValue) { - return m_pNode->JSNode()->SetEnum(XFA_Attribute::TransferEncoding, - iTransferEncoding, false); + m_pNode->JSNode()->SetEnum(XFA_Attribute::TransferEncoding, + iTransferEncoding, false); } - return true; } diff --git a/xfa/fxfa/parser/cxfa_imagedata.h b/xfa/fxfa/parser/cxfa_imagedata.h index 45474260ab..b8e5141cd7 100644 --- a/xfa/fxfa/parser/cxfa_imagedata.h +++ b/xfa/fxfa/parser/cxfa_imagedata.h @@ -21,13 +21,13 @@ class CXFA_ImageData : public CXFA_DataData { bool GetContent(WideString& wsText); bool GetHref(WideString& wsHref); - bool SetHref(const WideString& wsHref); + void SetHref(const WideString& wsHref); XFA_ATTRIBUTEENUM GetTransferEncoding(); - bool SetTransferEncoding(XFA_ATTRIBUTEENUM iTransferEncoding); + void SetTransferEncoding(XFA_ATTRIBUTEENUM iTransferEncoding); bool GetContentType(WideString& wsContentType); - bool SetContentType(const WideString& wsContentType); + void SetContentType(const WideString& wsContentType); private: bool m_bDefValue; -- cgit v1.2.3