From f58b6f62614357ef3a6f171a9f5c89d72981ac40 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 18 Oct 2018 21:04:03 +0000 Subject: 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 Commit-Queue: Ryan Harrison --- core/fxcrt/xml/cfx_xmlelement.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fxcrt/xml/cfx_xmlelement.h') diff --git a/core/fxcrt/xml/cfx_xmlelement.h b/core/fxcrt/xml/cfx_xmlelement.h index 8a8720fa83..822f5ec132 100644 --- a/core/fxcrt/xml/cfx_xmlelement.h +++ b/core/fxcrt/xml/cfx_xmlelement.h @@ -24,7 +24,7 @@ class CFX_XMLElement final : public CFX_XMLNode { CFX_XMLNode* Clone(CFX_XMLDocument* doc) override; void Save(const RetainPtr& pXMLStream) override; - WideString GetName() const { return name_; } + const WideString& GetName() const { return name_; } const std::map& GetAttributes() const { return attrs_; @@ -48,7 +48,7 @@ class CFX_XMLElement final : public CFX_XMLNode { private: WideString AttributeToString(const WideString& name, const WideString& value); - WideString name_; + const WideString name_; std::map attrs_; }; -- cgit v1.2.3