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 /test/ffmpeg_audio_only_test.cc | |
| parent | 4e83acad0c2a5c528709a175a80261b8147d3b49 (diff) | |
Use make_shared<>.
Diffstat (limited to 'test/ffmpeg_audio_only_test.cc')
| -rw-r--r-- | test/ffmpeg_audio_only_test.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ffmpeg_audio_only_test.cc b/test/ffmpeg_audio_only_test.cc index bad800e57..2101e9774 100644 --- a/test/ffmpeg_audio_only_test.cc +++ b/test/ffmpeg_audio_only_test.cc @@ -27,8 +27,10 @@ #include "test.h" #include <sndfile.h> #include <boost/test/unit_test.hpp> +#include <boost/make_shared.hpp> using boost::shared_ptr; +using boost::make_shared; /** Test the FFmpeg code with audio-only content */ static void @@ -37,7 +39,7 @@ test (boost::filesystem::path file) shared_ptr<Film> film = new_test_film ("ffmpeg_audio_only_test"); film->set_name ("test_film"); film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test")); - shared_ptr<FFmpegContent> c (new FFmpegContent (film, file)); + shared_ptr<FFmpegContent> c = make_shared<FFmpegContent> (film, file); film->examine_and_add_content (c); wait_for_jobs (); film->write_metadata (); @@ -56,7 +58,7 @@ test (boost::filesystem::path file) BOOST_REQUIRE_EQUAL (info.samplerate, 48000); float* ref_buffer = new float[info.samplerate * info.channels]; - shared_ptr<Player> player (new Player (film, film->playlist ())); + shared_ptr<Player> player = make_shared<Player> (film, film->playlist ()); for (DCPTime t; t < film->length(); t += DCPTime::from_seconds (1)) { int const N = sf_readf_float (ref, ref_buffer, info.samplerate); |
