summaryrefslogtreecommitdiff
path: root/xfa/fde/xml/fde_xml_imp.h
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-06-18 06:25:37 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-18 06:25:37 -0700
commiteec3a366adbfada36b98f1de651546ee09df8fc0 (patch)
tree794aa8c69392b60d8737a8a5b424732b98bdd4b4 /xfa/fde/xml/fde_xml_imp.h
parent4ce94e118d66064715de5baebeb4b2b580dcac66 (diff)
downloadpdfium-eec3a366adbfada36b98f1de651546ee09df8fc0.tar.xz
Make code compile with clang_use_chrome_plugin (final)
This change mainly contains files in xfa/ and fxjse/ directories which were not covered by previous changes. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. After this change, PDFium can be compiled with "clang_use_chrome_plugin=true" for GN build. Since clang_use_chrome_plugin is true by default, we no longer need to set this parameter explicitly. The changes are mainly the following: -- move inline constructor/destructor of complex class/struct out-of-line; -- add constructor/destructor of complex class/struct if not explicitly defined; -- add explicit out-of-line copy constructor when needed; -- move inline virtual functions out-of-line; -- Properly mark virtual functions with 'override'; -- some minor cleanups; BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2072803002
Diffstat (limited to 'xfa/fde/xml/fde_xml_imp.h')
-rw-r--r--xfa/fde/xml/fde_xml_imp.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/xfa/fde/xml/fde_xml_imp.h b/xfa/fde/xml/fde_xml_imp.h
index b977d693d8..ba75f6b409 100644
--- a/xfa/fde/xml/fde_xml_imp.h
+++ b/xfa/fde/xml/fde_xml_imp.h
@@ -40,10 +40,10 @@ class CFDE_XMLNode : public CFX_Target {
};
CFDE_XMLNode();
- virtual ~CFDE_XMLNode();
+ ~CFDE_XMLNode() override;
- virtual void Release() { delete this; }
- virtual FDE_XMLNODETYPE GetType() const { return FDE_XMLNODE_Unknown; }
+ virtual void Release();
+ virtual FDE_XMLNODETYPE GetType() const;
virtual CFDE_XMLNode* Clone(FX_BOOL bRecursive);
int32_t CountChildNodes() const;
@@ -73,12 +73,12 @@ class CFDE_XMLNode : public CFX_Target {
class CFDE_XMLInstruction : public CFDE_XMLNode {
public:
- CFDE_XMLInstruction(const CFX_WideString& wsTarget);
- ~CFDE_XMLInstruction() override {}
+ explicit CFDE_XMLInstruction(const CFX_WideString& wsTarget);
+ ~CFDE_XMLInstruction() override;
// CFDE_XMLNode
- void Release() override { delete this; }
- FDE_XMLNODETYPE GetType() const override { return FDE_XMLNODE_Instruction; }
+ void Release() override;
+ FDE_XMLNODETYPE GetType() const override;
CFDE_XMLNode* Clone(FX_BOOL bRecursive) override;
void GetTargetName(CFX_WideString& wsTarget) const { wsTarget = m_wsTarget; }
@@ -109,12 +109,12 @@ class CFDE_XMLInstruction : public CFDE_XMLNode {
class CFDE_XMLElement : public CFDE_XMLNode {
public:
- CFDE_XMLElement(const CFX_WideString& wsTag);
+ explicit CFDE_XMLElement(const CFX_WideString& wsTag);
~CFDE_XMLElement() override;
// CFDE_XMLNode
- void Release() override { delete this; }
- FDE_XMLNODETYPE GetType() const override { return FDE_XMLNODE_Element; }
+ void Release() override;
+ FDE_XMLNODETYPE GetType() const override;
CFDE_XMLNode* Clone(FX_BOOL bRecursive) override;
void GetTagName(CFX_WideString& wsTag) const;
@@ -151,12 +151,12 @@ class CFDE_XMLElement : public CFDE_XMLNode {
class CFDE_XMLText : public CFDE_XMLNode {
public:
- CFDE_XMLText(const CFX_WideString& wsText);
- ~CFDE_XMLText() override {}
+ explicit CFDE_XMLText(const CFX_WideString& wsText);
+ ~CFDE_XMLText() override;
// CFDE_XMLNode
- void Release() override { delete this; }
- FDE_XMLNODETYPE GetType() const override { return FDE_XMLNODE_Text; }
+ void Release() override;
+ FDE_XMLNODETYPE GetType() const override;
CFDE_XMLNode* Clone(FX_BOOL bRecursive) override;
void GetText(CFX_WideString& wsText) const { wsText = m_wsText; }
@@ -167,17 +167,17 @@ class CFDE_XMLText : public CFDE_XMLNode {
class CFDE_XMLDeclaration : public CFDE_XMLNode {
public:
- CFDE_XMLDeclaration() : CFDE_XMLNode() {}
+ CFDE_XMLDeclaration() {}
~CFDE_XMLDeclaration() override {}
};
class CFDE_XMLCharData : public CFDE_XMLDeclaration {
public:
- CFDE_XMLCharData(const CFX_WideString& wsCData);
- ~CFDE_XMLCharData() override {}
+ explicit CFDE_XMLCharData(const CFX_WideString& wsCData);
+ ~CFDE_XMLCharData() override;
- void Release() override { delete this; }
- FDE_XMLNODETYPE GetType() const override { return FDE_XMLNODE_CharData; }
+ void Release() override;
+ FDE_XMLNODETYPE GetType() const override;
CFDE_XMLNode* Clone(FX_BOOL bRecursive) override;
void GetCharData(CFX_WideString& wsCharData) const {
@@ -222,8 +222,8 @@ class CFDE_XMLParser {
class CFDE_BlockBuffer : public CFX_Target {
public:
- CFDE_BlockBuffer(int32_t iAllocStep = 1024 * 1024);
- ~CFDE_BlockBuffer();
+ explicit CFDE_BlockBuffer(int32_t iAllocStep = 1024 * 1024);
+ ~CFDE_BlockBuffer() override;
FX_BOOL InitBuffer(int32_t iBufferSize = 1024 * 1024);
FX_BOOL IsInitialized() { return m_iBufferSize / m_iAllocStep >= 1; }
@@ -259,7 +259,7 @@ class CFDE_BlockBuffer : public CFX_Target {
class CFDE_XMLSyntaxParser : public CFX_Target {
public:
CFDE_XMLSyntaxParser();
- ~CFDE_XMLSyntaxParser();
+ ~CFDE_XMLSyntaxParser() override;
void Release() { delete this; }
void Init(IFX_Stream* pStream,