mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-16 09:31:14 +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:
@@ -963,7 +963,7 @@ void PluginRegistrationDialog::OnOK(wxCommandEvent & WXUNUSED(evt))
|
||||
mLongestPath + wxT("\n");
|
||||
|
||||
wxString msg;
|
||||
msg.Printf(_("Enabling effects:\n\n%s"), last3.c_str());
|
||||
msg.Printf(_("Enabling effects:\n\n%s"), last3);
|
||||
|
||||
// Make sure the progress dialog is deleted before we call EndModal() or
|
||||
// we will leave the project window in an unusable state on OSX.
|
||||
@@ -981,7 +981,7 @@ void PluginRegistrationDialog::OnOK(wxCommandEvent & WXUNUSED(evt))
|
||||
if (item.state == STATE_Enabled && item.plugs[0]->GetPluginType() == PluginTypeStub)
|
||||
{
|
||||
last3 = last3.AfterFirst(wxT('\n')) + item.path + wxT("\n");
|
||||
auto status = progress.Update(++i, enableCount, wxString::Format(_("Enabling effect:\n\n%s"), last3.c_str()));
|
||||
auto status = progress.Update(++i, enableCount, wxString::Format(_("Enabling effect:\n\n%s"), last3));
|
||||
if (status == ProgressResult::Cancelled)
|
||||
{
|
||||
break;
|
||||
@@ -2588,31 +2588,31 @@ IdentInterface *PluginManager::GetInstance(const PluginID & ID)
|
||||
PluginID PluginManager::GetID(ModuleInterface *module)
|
||||
{
|
||||
return wxString::Format(wxT("%s_%s_%s_%s_%s"),
|
||||
GetPluginTypeString(PluginTypeModule).c_str(),
|
||||
GetPluginTypeString(PluginTypeModule),
|
||||
wxEmptyString,
|
||||
module->GetVendor().c_str(),
|
||||
module->GetName().c_str(),
|
||||
module->GetPath().c_str());
|
||||
module->GetVendor(),
|
||||
module->GetName(),
|
||||
module->GetPath());
|
||||
}
|
||||
|
||||
PluginID PluginManager::GetID(EffectIdentInterface *effect)
|
||||
{
|
||||
return wxString::Format(wxT("%s_%s_%s_%s_%s"),
|
||||
GetPluginTypeString(PluginTypeEffect).c_str(),
|
||||
effect->GetFamily().c_str(),
|
||||
effect->GetVendor().c_str(),
|
||||
effect->GetName().c_str(),
|
||||
effect->GetPath().c_str());
|
||||
GetPluginTypeString(PluginTypeEffect),
|
||||
effect->GetFamily(),
|
||||
effect->GetVendor(),
|
||||
effect->GetName(),
|
||||
effect->GetPath());
|
||||
}
|
||||
|
||||
PluginID PluginManager::GetID(ImporterInterface *importer)
|
||||
{
|
||||
return wxString::Format(wxT("%s_%s_%s_%s_%s"),
|
||||
GetPluginTypeString(PluginTypeImporter).c_str(),
|
||||
GetPluginTypeString(PluginTypeImporter),
|
||||
wxEmptyString,
|
||||
importer->GetVendor().c_str(),
|
||||
importer->GetName().c_str(),
|
||||
importer->GetPath().c_str());
|
||||
importer->GetVendor(),
|
||||
importer->GetName(),
|
||||
importer->GetPath());
|
||||
}
|
||||
|
||||
wxString PluginManager::GetPluginTypeString(PluginType type)
|
||||
@@ -2810,7 +2810,7 @@ bool PluginManager::SetConfig(const wxString & key, const wxString & value)
|
||||
|
||||
if (!key.IsEmpty())
|
||||
{
|
||||
wxString wxval = value.c_str();
|
||||
wxString wxval = value;
|
||||
result = GetSettings()->Write(key, wxval);
|
||||
if (result)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user