summaryrefslogtreecommitdiff
path: root/src/wx/hints_dialog.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/hints_dialog.cc
parent4e83acad0c2a5c528709a175a80261b8147d3b49 (diff)
Use make_shared<>.
Diffstat (limited to 'src/wx/hints_dialog.cc')
-rw-r--r--src/wx/hints_dialog.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wx/hints_dialog.cc b/src/wx/hints_dialog.cc
index 72ab0eef4..2150d4576 100644
--- a/src/wx/hints_dialog.cc
+++ b/src/wx/hints_dialog.cc
@@ -29,9 +29,11 @@
#include <wx/richtext/richtextctrl.h>
#include <boost/algorithm/string.hpp>
#include <boost/foreach.hpp>
+#include <boost/make_shared.hpp>
using std::max;
using boost::shared_ptr;
+using boost::make_shared;
using boost::optional;
using boost::dynamic_pointer_cast;
@@ -176,7 +178,7 @@ HintsDialog::film_changed ()
boost::filesystem::path path = film->audio_analysis_path (film->playlist ());
if (boost::filesystem::exists (path)) {
- shared_ptr<AudioAnalysis> an (new AudioAnalysis (path));
+ shared_ptr<AudioAnalysis> an = make_shared<AudioAnalysis> (path);
if (an->sample_peak() || an->true_peak()) {
float const peak = max (an->sample_peak().get_value_or(0), an->true_peak().get_value_or(0));
float const peak_dB = 20 * log10 (peak) + an->gain_correction (film->playlist ());