1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-02 22:27:10 +01:00

Remove needless uses of wxString::c_str() in wxString::Format...

... and similar wx "variadics," which all treat wxString smartly enough that
you don't need this.

Don't need c_str either to convert wxString to const wxChar * because
wxString has a conversion operator that does the same.
This commit is contained in:
Paul Licameli
2017-10-09 01:03:14 -04:00
parent 0efbf6a190
commit 7fd78183d2
76 changed files with 500 additions and 504 deletions

View File

@@ -427,7 +427,7 @@ wxString BatchCommands::BuildCleanFileName(const wxString &fileName, const wxStr
int minute = now.GetMinute();
int second = now.GetSecond();
justName = wxString::Format(wxT("%d-%s-%02d-%02d-%02d-%02d"),
year, monthName.c_str(), dom, hour, minute, second);
year, monthName, dom, hour, minute, second);
// SetName(cleanedFileName);
// bool isStereo;
@@ -436,7 +436,7 @@ wxString BatchCommands::BuildCleanFileName(const wxString &fileName, const wxStr
//OnSelectAll();
pathName = FileNames::FindDefaultPath(FileNames::Operation::Export);
::AudacityMessageBox(wxString::Format(_("Export recording to %s\n/%s/%s%s"),
pathName.c_str(), cleanedString.c_str(), justName.c_str(), extension.c_str()),
pathName, cleanedString, justName, extension),
_("Export recording"),
wxOK | wxCENTRE);
pathName += wxFileName::GetPathSeparator();
@@ -585,7 +585,7 @@ bool BatchCommands::ApplySpecialCommand(int WXUNUSED(iCommand), const wxString &
return false;
#endif
}
AudacityMessageBox(wxString::Format(_("Command %s not implemented yet"),command.c_str()));
AudacityMessageBox(wxString::Format(_("Command %s not implemented yet"),command));
return false;
}
// end CLEANSPEECH remnant
@@ -641,7 +641,7 @@ bool BatchCommands::ApplyCommand(const wxString & command, const wxString & para
AudacityMessageBox(
wxString::Format(
_("Your batch command of %s was not recognized."), command.c_str() ));
_("Your batch command of %s was not recognized."), command ));
return false;
}
@@ -703,8 +703,8 @@ bool BatchCommands::ApplyChain(const wxString & filename)
else
{
/* i18n-hint: active verb in past tense */
longDesc = wxString::Format(_("Applied batch chain '%s'"), name.c_str());
shortDesc = wxString::Format(_("Apply '%s'"), name.c_str());
longDesc = wxString::Format(_("Applied batch chain '%s'"), name);
shortDesc = wxString::Format(_("Apply '%s'"), name);
}
if (!proj)
@@ -762,12 +762,12 @@ bool BatchCommands::ReportAndSkip(const wxString & command, const wxString & par
//TODO: Add a cancel button to these, and add the logic so that we can abort.
if( params != wxT("") )
{
AudacityMessageBox( wxString::Format(_("Apply %s with parameter(s)\n\n%s"),command.c_str(), params.c_str()),
AudacityMessageBox( wxString::Format(_("Apply %s with parameter(s)\n\n%s"),command, params),
_("Test Mode"));
}
else
{
AudacityMessageBox( wxString::Format(_("Apply %s"),command.c_str()),
AudacityMessageBox( wxString::Format(_("Apply %s"),command),
_("Test Mode"));
}
return true;