summaryrefslogtreecommitdiff
path: root/core/fxcrt/xml/cfx_xmltext.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-18 21:04:03 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-18 21:04:03 +0000
commitf58b6f62614357ef3a6f171a9f5c89d72981ac40 (patch)
tree4d30d9b9df8b831d24ae8a6d37b0ee4abce7bdb3 /core/fxcrt/xml/cfx_xmltext.cpp
parent8e49f3fce1a56634284b254a0dc2d329da349355 (diff)
downloadpdfium-f58b6f62614357ef3a6f171a9f5c89d72981ac40.tar.xz
Remove some useless calls to the CFX_XMLNode ctor from subclasses.
Also fix some nits: - Make member variable names consistent. - Make member variables const. - Make trivial getters return const-ref. Change-Id: Ibd34c9bc58ec0eed3edfc3a8ea39b533a41cad73 Reviewed-on: https://pdfium-review.googlesource.com/c/44151 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcrt/xml/cfx_xmltext.cpp')
-rw-r--r--core/fxcrt/xml/cfx_xmltext.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fxcrt/xml/cfx_xmltext.cpp b/core/fxcrt/xml/cfx_xmltext.cpp
index c835680580..b6c1be7b07 100644
--- a/core/fxcrt/xml/cfx_xmltext.cpp
+++ b/core/fxcrt/xml/cfx_xmltext.cpp
@@ -8,8 +8,7 @@
#include "core/fxcrt/xml/cfx_xmldocument.h"
-CFX_XMLText::CFX_XMLText(const WideString& wsText)
- : CFX_XMLNode(), m_wsText(wsText) {}
+CFX_XMLText::CFX_XMLText(const WideString& wsText) : text_(wsText) {}
CFX_XMLText::~CFX_XMLText() = default;
@@ -18,7 +17,7 @@ FX_XMLNODETYPE CFX_XMLText::GetType() const {
}
CFX_XMLNode* CFX_XMLText::Clone(CFX_XMLDocument* doc) {
- return doc->CreateNode<CFX_XMLText>(m_wsText);
+ return doc->CreateNode<CFX_XMLText>(text_);
}
void CFX_XMLText::Save(const RetainPtr<IFX_SeekableWriteStream>& pXMLStream) {