summaryrefslogtreecommitdiff
path: root/src/wx/audio_panel.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-21 01:14:06 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-21 01:14:06 +0100
commit5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f (patch)
tree769dca1358e35017ce5a5b3ab2dfafe2b24d61ed /src/wx/audio_panel.cc
parent4e83acad0c2a5c528709a175a80261b8147d3b49 (diff)
Use make_shared<>.
Diffstat (limited to 'src/wx/audio_panel.cc')
-rw-r--r--src/wx/audio_panel.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wx/audio_panel.cc b/src/wx/audio_panel.cc
index ab26329a4..8ffe8b7a4 100644
--- a/src/wx/audio_panel.cc
+++ b/src/wx/audio_panel.cc
@@ -33,6 +33,7 @@
#include "lib/audio_content.h"
#include <wx/spinctrl.h>
#include <boost/foreach.hpp>
+#include <boost/make_shared.hpp>
#include <iostream>
using std::vector;
@@ -42,6 +43,7 @@ using std::list;
using std::pair;
using boost::dynamic_pointer_cast;
using boost::shared_ptr;
+using boost::make_shared;
using boost::optional;
AudioPanel::AudioPanel (ContentPanel* p)
@@ -312,10 +314,10 @@ AudioPanel::setup_peak ()
if (sel.size() != 1) {
_peak->SetLabel (wxT (""));
} else {
- shared_ptr<Playlist> playlist (new Playlist);
+ shared_ptr<Playlist> playlist = make_shared<Playlist> ();
playlist->add (sel.front ());
try {
- shared_ptr<AudioAnalysis> analysis (new AudioAnalysis (_parent->film()->audio_analysis_path (playlist)));
+ shared_ptr<AudioAnalysis> analysis = make_shared<AudioAnalysis> (_parent->film()->audio_analysis_path (playlist));
if (analysis->sample_peak ()) {
float const peak_dB = 20 * log10 (analysis->sample_peak().get()) + analysis->gain_correction (playlist);
if (peak_dB > -3) {