1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-08 09:27:11 +01:00

Remove some naked new amd delete in: Mixer Board

This commit is contained in:
Paul Licameli
2016-08-01 11:22:08 -04:00
parent fd2e36e0c8
commit 23516a7732
2 changed files with 60 additions and 185 deletions

View File

@@ -156,13 +156,14 @@ WX_DEFINE_ARRAY(MixerTrackCluster*, MixerTrackClusterArray);
class MusicalInstrument
{
public:
MusicalInstrument(wxBitmap* pBitmap, const wxString & strXPMfilename);
MusicalInstrument(std::unique_ptr<wxBitmap> &&pBitmap, const wxString & strXPMfilename);
virtual ~MusicalInstrument();
wxBitmap* mBitmap;
std::unique_ptr<wxBitmap> mBitmap;
wxArrayString mKeywords;
};
WX_DECLARE_OBJARRAY(MusicalInstrument, MusicalInstrumentArray);
using MusicalInstrumentArray = std::vector<movable_ptr<MusicalInstrument>>;
@@ -274,15 +275,9 @@ private:
public:
// mute & solo button images: Create once and store on MixerBoard for use in all MixerTrackClusters.
wxImage* mImageMuteUp;
wxImage* mImageMuteOver;
wxImage* mImageMuteDown;
wxImage* mImageMuteDownWhileSolo; // the one actually alternate image
wxImage* mImageMuteDisabled;
wxImage* mImageSoloUp;
wxImage* mImageSoloOver;
wxImage* mImageSoloDown;
wxImage* mImageSoloDisabled;
std::unique_ptr<wxImage> mImageMuteUp, mImageMuteOver, mImageMuteDown,
mImageMuteDownWhileSolo, // the one actually alternate image
mImageMuteDisabled, mImageSoloUp, mImageSoloOver, mImageSoloDown, mImageSoloDisabled;
int mMuteSoloWidth;