From: Vadim Zeitlin Date: Mon, 28 Feb 2005 17:20:12 +0000 (+0000) Subject: return const ref to label from GetLabel() and other accessors instead of copying... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/27e090842d1cb879327056ef6d309177b25a405a?ds=inline return const ref to label from GetLabel() and other accessors instead of copying it, this fixes 1153178 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/tbarbase.h b/include/wx/tbarbase.h index 83864fe277..1197888d37 100644 --- a/include/wx/tbarbase.h +++ b/include/wx/tbarbase.h @@ -151,10 +151,10 @@ public: const wxBitmap& GetBitmap() const { return IsEnabled() ? GetNormalBitmap() : GetDisabledBitmap(); } - wxString GetLabel() const { return m_label; } + const wxString& GetLabel() const { return m_label; } - wxString GetShortHelp() const { return m_shortHelpString; } - wxString GetLongHelp() const { return m_longHelpString; } + const wxString& GetShortHelp() const { return m_shortHelpString; } + const wxString& GetLongHelp() const { return m_longHelpString; } wxObject *GetClientData() const {