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/ffmpeg_content.cc | |
| parent | 4e83acad0c2a5c528709a175a80261b8147d3b49 (diff) | |
Use make_shared<>.
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index b34fdf6aa..f3a4c4c4f 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -42,6 +42,7 @@ extern "C" { } #include <libxml++/libxml++.h> #include <boost/foreach.hpp> +#include <boost/make_shared.hpp> #include <iostream> #include "i18n.h" @@ -56,6 +57,7 @@ using std::pair; using std::make_pair; using std::max; using boost::shared_ptr; +using boost::make_shared; using boost::dynamic_pointer_cast; using boost::optional; @@ -78,7 +80,7 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> film, cxml::ConstNodePtr no list<cxml::NodePtr> c = node->node_children ("SubtitleStream"); for (list<cxml::NodePtr>::const_iterator i = c.begin(); i != c.end(); ++i) { - _subtitle_streams.push_back (shared_ptr<FFmpegSubtitleStream> (new FFmpegSubtitleStream (*i, version))); + _subtitle_streams.push_back (make_shared<FFmpegSubtitleStream> (*i, version)); if ((*i)->optional_number_child<int> ("Selected")) { _subtitle_stream = _subtitle_streams.back (); } @@ -86,7 +88,7 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> film, cxml::ConstNodePtr no c = node->node_children ("AudioStream"); for (list<cxml::NodePtr>::const_iterator i = c.begin(); i != c.end(); ++i) { - shared_ptr<FFmpegAudioStream> as (new FFmpegAudioStream (*i, version)); + shared_ptr<FFmpegAudioStream> as = make_shared<FFmpegAudioStream> (*i, version); audio->add_stream (as); if (version < 11 && !(*i)->optional_node_child ("Selected")) { /* This is an old file and this stream is not selected, so un-map it */ @@ -210,7 +212,7 @@ FFmpegContent::examine (shared_ptr<Job> job) Content::examine (job); - shared_ptr<FFmpegExaminer> examiner (new FFmpegExaminer (shared_from_this (), job)); + shared_ptr<FFmpegExaminer> examiner = make_shared<FFmpegExaminer> (shared_from_this (), job); if (examiner->has_video ()) { video.reset (new VideoContent (this)); |
