From: Václav Slavík <vslavik@fastmail.fm>
Date: Wed, 16 May 2007 20:26:41 +0000 (+0000)
Subject: return const wxString& instead of wxString from the accessor methods that allow it
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/12058e0cb5b6eb432924bb85e210a113b7bdb013

return const wxString& instead of wxString from the accessor methods that allow it


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/include/wx/xml/xml.h b/include/wx/xml/xml.h
index 7c36f13b9e..8965029289 100644
--- a/include/wx/xml/xml.h
+++ b/include/wx/xml/xml.h
@@ -122,8 +122,8 @@ public:
 
     // access methods:
     wxXmlNodeType GetType() const { return m_type; }
-    wxString GetName() const { return m_name; }
-    wxString GetContent() const { return m_content; }
+    const wxString& GetName() const { return m_name; }
+    const wxString& GetContent() const { return m_content; }
 
     bool IsWhitespaceOnly() const;
     int GetDepth(wxXmlNode *grandparent = NULL) const;
@@ -211,11 +211,11 @@ public:
     wxXmlNode *GetRoot() const { return m_root; }
 
     // Returns version of document (may be empty).
-    wxString GetVersion() const { return m_version; }
+    const wxString& GetVersion() const { return m_version; }
     // Returns encoding of document (may be empty).
     // Note: this is the encoding original file was saved in, *not* the
     // encoding of in-memory representation!
-    wxString GetFileEncoding() const { return m_fileEncoding; }
+    const wxString& GetFileEncoding() const { return m_fileEncoding; }
 
     // Write-access methods:
     wxXmlNode *DetachRoot() { wxXmlNode *old=m_root; m_root=NULL; return old; }