mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-05 22:28:57 +02:00
More uses of std::make_unique
This commit is contained in:
parent
13e056de43
commit
15004b1ade
@ -549,7 +549,7 @@ TrackPanel::TrackPanel(wxWindow * parent, wxWindowID id,
|
||||
|
||||
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||
mFreqSelMode = FREQ_SEL_INVALID;
|
||||
mFrequencySnapper.reset(new SpectrumAnalyst());
|
||||
mFrequencySnapper = std::make_unique<SpectrumAnalyst>();
|
||||
|
||||
mLastF0 = mLastF1 = SelectedRegion::UndefinedFrequency;
|
||||
#endif
|
||||
|
@ -292,7 +292,7 @@ void AButton::SetAlternateIdx(unsigned idx)
|
||||
void AButton::FollowModifierKeys()
|
||||
{
|
||||
if(!mListener)
|
||||
mListener.reset(new Listener(this));
|
||||
mListener = std::make_unique<Listener>(this);
|
||||
}
|
||||
|
||||
void AButton::SetFocusRect(wxRect & r)
|
||||
|
@ -514,7 +514,6 @@ void LWSlider::Init(wxWindow * parent,
|
||||
|
||||
AdjustSize(size);
|
||||
|
||||
mpRuler = NULL; // Do this and Move() before Draw().
|
||||
Move(pos);
|
||||
}
|
||||
|
||||
@ -811,7 +810,7 @@ void LWSlider::Draw(wxDC & paintDC)
|
||||
//{
|
||||
// if (!mpRuler)
|
||||
// {
|
||||
// mpRuler = new Ruler();
|
||||
// mpRuler = std::make_unique<Ruler>();
|
||||
// mpRuler->mbTicksOnly = false;
|
||||
// mpRuler->mbTicksAtExtremes = true;
|
||||
|
||||
|
@ -231,8 +231,6 @@ class LWSlider
|
||||
std::unique_ptr<TipPanel> mTipPanel;
|
||||
wxString mTipTemplate;
|
||||
|
||||
std::unique_ptr<Ruler> mpRuler;
|
||||
|
||||
bool mIsDragging;
|
||||
|
||||
std::unique_ptr<wxBitmap> mBitmap, mThumbBitmap;
|
||||
|
Loading…
x
Reference in New Issue
Block a user