diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-06-21 01:14:06 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-06-21 01:14:06 +0100 |
| commit | 5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f (patch) | |
| tree | 769dca1358e35017ce5a5b3ab2dfafe2b24d61ed /src/lib/audio_analysis.cc | |
| parent | 4e83acad0c2a5c528709a175a80261b8147d3b49 (diff) | |
Use make_shared<>.
Diffstat (limited to 'src/lib/audio_analysis.cc')
| -rw-r--r-- | src/lib/audio_analysis.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/audio_analysis.cc b/src/lib/audio_analysis.cc index 1863e38ee..b133dec3d 100644 --- a/src/lib/audio_analysis.cc +++ b/src/lib/audio_analysis.cc @@ -27,6 +27,7 @@ #include <libxml++/libxml++.h> #include <boost/filesystem.hpp> #include <boost/foreach.hpp> +#include <boost/make_shared.hpp> #include <stdint.h> #include <cmath> #include <cstdio> @@ -41,6 +42,7 @@ using std::cout; using std::max; using std::list; using boost::shared_ptr; +using boost::make_shared; using boost::dynamic_pointer_cast; AudioAnalysis::AudioAnalysis (int channels) @@ -112,7 +114,7 @@ AudioAnalysis::points (int c) const void AudioAnalysis::write (boost::filesystem::path filename) { - shared_ptr<xmlpp::Document> doc (new xmlpp::Document); + shared_ptr<xmlpp::Document> doc = make_shared<xmlpp::Document> (); xmlpp::Element* root = doc->create_root_node ("AudioAnalysis"); BOOST_FOREACH (vector<AudioPoint>& i, _data) { |
