mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-09 14:43:57 +01:00
Various uses of make_unique
This commit is contained in:
@@ -1778,13 +1778,13 @@ bool AudioUnitEffect::PopulateUI(wxWindow *parent)
|
||||
}
|
||||
else
|
||||
{
|
||||
mControl = new AUControl;
|
||||
if (!mControl)
|
||||
auto pControl = std::make_unique<AUControl>();
|
||||
if (!pControl)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!mControl->Create(container, mComponent, mUnit, mUIType == wxT("Full")))
|
||||
if (!pControl->Create(container, mComponent, mUnit, mUIType == wxT("Full")))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1792,7 +1792,7 @@ bool AudioUnitEffect::PopulateUI(wxWindow *parent)
|
||||
{
|
||||
auto innerSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
||||
|
||||
innerSizer->Add(mControl, 1, wxEXPAND);
|
||||
innerSizer->Add(pControl.release(), 1, wxEXPAND);
|
||||
container->SetSizer(innerSizer.release());
|
||||
}
|
||||
|
||||
|
||||
@@ -200,7 +200,6 @@ private:
|
||||
EffectUIHostInterface *mUIHost;
|
||||
wxWindow *mParent;
|
||||
wxDialog *mDialog;
|
||||
AUControl *mControl;
|
||||
wxString mUIType;
|
||||
bool mIsGraphical;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user