From e3a62efd4380b5e5fdf527fad99d5075b9ae0896 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 11 Jun 2019 15:13:02 +0200 Subject: [PATCH] Micro optimization in wxStaticTextBase::UpdateLabel() Avoid an unnecessary wxString copy. --- src/common/stattextcmn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/stattextcmn.cpp b/src/common/stattextcmn.cpp index 811aceb190..d3e01244d3 100644 --- a/src/common/stattextcmn.cpp +++ b/src/common/stattextcmn.cpp @@ -232,7 +232,7 @@ void wxStaticTextBase::UpdateLabel() if (!IsEllipsized()) return; - wxString newlabel = GetEllipsizedLabel(); + const wxString& newlabel = GetEllipsizedLabel(); // we need to touch the "real" label (i.e. the text set inside the control, // using port-specific functions) instead of the string returned by GetLabel().