1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Review uses of safenew...

... add comments and assertions, and use make_unique instead where possible
This commit is contained in:
Paul Licameli
2016-08-13 23:16:05 -04:00
parent 84a6456788
commit 32f24eabb2
13 changed files with 24 additions and 6 deletions

View File

@@ -100,6 +100,7 @@ void HelpSystem::ShowHtmlText(wxWindow *pParent,
{
LinkingHtmlWindow *html;
wxASSERT(pParent); // to justify safenew
auto pFrame = safenew wxFrame {
pParent, wxID_ANY, Title, wxDefaultPosition, wxDefaultSize,
#if defined(__WXMAC__)
@@ -195,6 +196,7 @@ void HelpSystem::ShowHelpDialog(wxWindow *parent,
const wxString &remoteURL,
bool bModal)
{
wxASSERT(parent); // to justify safenew
AudacityProject * pProj = GetActiveProject();
wxString HelpMode = wxT("Local");
@@ -341,6 +343,7 @@ void HelpSystem::ShowHelpDialog(wxWindow *parent,
wxLogMessage(wxT("webHelpPage %s, localHelpPage %s"),
webHelpPage.c_str(), localHelpPage.c_str());
wxASSERT(parent); // to justify safenew
HelpSystem::ShowHelpDialog(
parent,
localHelpPage,