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/audio_decoder_test.cc | |
| parent | 4e83acad0c2a5c528709a175a80261b8147d3b49 (diff) | |
Use make_shared<>.
Diffstat (limited to 'test/audio_decoder_test.cc')
| -rw-r--r-- | test/audio_decoder_test.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/audio_decoder_test.cc b/test/audio_decoder_test.cc index 945773d12..92c99a378 100644 --- a/test/audio_decoder_test.cc +++ b/test/audio_decoder_test.cc @@ -28,6 +28,7 @@ #include "lib/audio_content.h" #include "lib/film.h" #include <boost/test/unit_test.hpp> +#include <boost/make_shared.hpp> #include <cassert> #include <iostream> @@ -35,6 +36,7 @@ using std::string; using std::cout; using std::min; using boost::shared_ptr; +using boost::make_shared; class TestAudioContent : public Content { @@ -76,7 +78,7 @@ public: _test_audio_content->audio_length() - _position ); - shared_ptr<AudioBuffers> buffers (new AudioBuffers (_test_audio_content->audio->stream()->channels(), N)); + shared_ptr<AudioBuffers> buffers = make_shared<AudioBuffers> (_test_audio_content->audio->stream()->channels(), N); for (int i = 0; i < _test_audio_content->audio->stream()->channels(); ++i) { for (int j = 0; j < N; ++j) { buffers->data(i)[j] = j + _position; |
