Use make_shared<>.
[dcpomatic.git] / src / wx / hints_dialog.cc
index 72ab0eef41f84e6e7fbac6772bf1eee7895768b0..2150d457626119affe1e78b58fb98beaff32ef77 100644 (file)
 #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 ());