mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-05 19:21:59 +01:00
Stack-allocate where possible! ...
... Removed many unnecessary naked news and deletes.
This commit is contained in:
@@ -589,12 +589,12 @@ void LabelDialog::OnExport(wxCommandEvent & WXUNUSED(event))
|
||||
wxString fName = mTrackNames[mTrackNames.GetCount() - 1].AfterFirst(wxT('-')).Mid(1);
|
||||
|
||||
fName = FileSelector(_("Export Labels As:"),
|
||||
wxEmptyString,
|
||||
fName.c_str(),
|
||||
wxT("txt"),
|
||||
wxT("*.txt"),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||
this);
|
||||
wxEmptyString,
|
||||
fName.c_str(),
|
||||
wxT("txt"),
|
||||
wxT("*.txt"),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||
this);
|
||||
|
||||
if (fName == wxT(""))
|
||||
return;
|
||||
@@ -617,9 +617,7 @@ void LabelDialog::OnExport(wxCommandEvent & WXUNUSED(event))
|
||||
|
||||
wxTextFile f(fName);
|
||||
#ifdef __WXMAC__
|
||||
wxFile *temp = new wxFile();
|
||||
temp->Create(fName);
|
||||
delete temp;
|
||||
wxFile{}.Create(fName);
|
||||
#else
|
||||
f.Create();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user