mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-26 07:13:49 +01:00
Throw by value, catch by reference: don't use pointers...
... that's what the better books on C++ recommend.
This commit is contained in:
@@ -384,13 +384,11 @@ void KeyConfigPrefs::OnExport(wxCommandEvent & WXUNUSED(event))
|
||||
mManager->WriteXML(prefFile);
|
||||
prefFile.Close();
|
||||
}
|
||||
catch (XMLFileWriterException* pException)
|
||||
catch (const XMLFileWriterException &)
|
||||
{
|
||||
wxMessageBox(_("Couldn't write to file: ") + file,
|
||||
_("Error Exporting Keyboard Shortcuts"),
|
||||
wxOK | wxCENTRE, this);
|
||||
|
||||
delete pException;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -967,13 +965,11 @@ void KeyConfigPrefs::OnExport(wxCommandEvent & WXUNUSED(event))
|
||||
mManager->WriteXML(prefFile);
|
||||
prefFile.Close();
|
||||
}
|
||||
catch (XMLFileWriterException* pException)
|
||||
catch (const XMLFileWriterException &)
|
||||
{
|
||||
wxMessageBox(_("Couldn't write to file: ") + file,
|
||||
_("Error Exporting Keyboard Shortcuts"),
|
||||
wxOK | wxCENTRE, this);
|
||||
|
||||
delete pException;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user