1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-20 17:41:13 +02:00

r & lvalue ref-qualified overloads of TranslatableString functions...

... and moves of TranslatableString arguments where possible
This commit is contained in:
Paul Licameli
2019-12-13 12:28:43 -05:00
parent 4b3f670bef
commit 8655e2e3b9
2 changed files with 28 additions and 13 deletions

View File

@@ -345,12 +345,14 @@ wxString TranslatableString::DoChooseFormat(
);
}
TranslatableString &&TranslatableString::Join(
const TranslatableString &arg, const wxString &separator ) &&
TranslatableString &TranslatableString::Join(
const TranslatableString arg, const wxString &separator ) &
{
auto prevFormatter = mFormatter;
mFormatter =
[prevFormatter, arg, separator](const wxString &str, Request request)
[prevFormatter,
arg /* = std::move( arg ) */,
separator](const wxString &str, Request request)
-> wxString {
switch ( request ) {
case Request::Context:
@@ -366,5 +368,5 @@ TranslatableString &&TranslatableString::Join(
}
}
};
return std::move( *this );
return *this;
}