Micro optimization in wxStaticTextBase::UpdateLabel()

Avoid an unnecessary wxString copy.
This commit is contained in:
Vadim Zeitlin 2019-06-11 15:13:02 +02:00
parent 8f47728fd2
commit e3a62efd43

View File

@ -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().