mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-16 07:47:58 +01:00
Remove some naked new amd delete in: toolbars
This commit is contained in:
committed by
Paul Licameli
parent
23516a7732
commit
52d12c6913
@@ -67,8 +67,6 @@ DeviceToolBar::DeviceToolBar()
|
||||
|
||||
DeviceToolBar::~DeviceToolBar()
|
||||
{
|
||||
delete mPlayBitmap;
|
||||
delete mRecordBitmap;
|
||||
}
|
||||
|
||||
void DeviceToolBar::Create(wxWindow *parent)
|
||||
@@ -102,7 +100,7 @@ void DeviceToolBar::Populate()
|
||||
|
||||
// Input device
|
||||
if( mRecordBitmap == NULL )
|
||||
mRecordBitmap = new wxBitmap(theTheme.Bitmap(bmpMic));
|
||||
mRecordBitmap = std::make_unique<wxBitmap>(theTheme.Bitmap(bmpMic));
|
||||
|
||||
Add(safenew wxStaticBitmap(this,
|
||||
wxID_ANY,
|
||||
@@ -122,7 +120,7 @@ void DeviceToolBar::Populate()
|
||||
|
||||
// Output device
|
||||
if( mPlayBitmap == NULL )
|
||||
mPlayBitmap = new wxBitmap(theTheme.Bitmap(bmpSpeaker));
|
||||
mPlayBitmap = std::make_unique<wxBitmap>(theTheme.Bitmap(bmpSpeaker));
|
||||
Add(safenew wxStaticBitmap(this,
|
||||
wxID_ANY,
|
||||
*mPlayBitmap), 0, wxALIGN_CENTER);
|
||||
|
||||
Reference in New Issue
Block a user