1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-19 23:21:33 +01:00

Sweep unnecessary wxString copies: widgets

This commit is contained in:
Paul Licameli
2016-02-22 21:16:12 -05:00
parent 4961006f1b
commit 2efa24bc10
13 changed files with 46 additions and 38 deletions

View File

@@ -84,8 +84,9 @@ protected:
// Return the string which would result from inserting the given character
// at the specified position.
wxString GetValueAfterInsertingChar(wxString val, int pos, wxChar ch) const
wxString GetValueAfterInsertingChar(const wxString &valArg, int pos, wxChar ch) const
{
wxString val(valArg);
val.insert(pos, ch);
return val;
}
@@ -236,7 +237,7 @@ protected:
{
LongestValueType value;
return BaseValidator::FromString(s, &value) ? NormalizeValue(value)
: wxString();
: wxEmptyString;
}
private: