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/video_decoder.cc | |
| parent | 4e83acad0c2a5c528709a175a80261b8147d3b49 (diff) | |
Use make_shared<>.
Diffstat (limited to 'src/lib/video_decoder.cc')
| -rw-r--r-- | src/lib/video_decoder.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc index edc746010..fbc8de9ae 100644 --- a/src/lib/video_decoder.cc +++ b/src/lib/video_decoder.cc @@ -25,6 +25,7 @@ #include "log.h" #include "compose.hpp" #include <boost/foreach.hpp> +#include <boost/make_shared.hpp> #include <iostream> #include "i18n.h" @@ -34,6 +35,7 @@ using std::list; using std::max; using std::back_inserter; using boost::shared_ptr; +using boost::make_shared; using boost::optional; VideoDecoder::VideoDecoder (Decoder* parent, shared_ptr<const Content> c, shared_ptr<Log> log) @@ -166,7 +168,7 @@ VideoDecoder::fill_one_eye (Frame from, Frame to, Eyes eye) } /* Fill with black... */ - shared_ptr<const ImageProxy> filler_image (new RawImageProxy (_black_image)); + shared_ptr<const ImageProxy> filler_image = make_shared<RawImageProxy> (_black_image); Part filler_part = PART_WHOLE; /* ...unless there's some video we can fill with */ @@ -192,8 +194,8 @@ void VideoDecoder::fill_both_eyes (VideoFrame from, VideoFrame to) { /* Fill with black... */ - shared_ptr<const ImageProxy> filler_left_image (new RawImageProxy (_black_image)); - shared_ptr<const ImageProxy> filler_right_image (new RawImageProxy (_black_image)); + shared_ptr<const ImageProxy> filler_left_image = make_shared<RawImageProxy> (_black_image); + shared_ptr<const ImageProxy> filler_right_image = make_shared<RawImageProxy> (_black_image); Part filler_left_part = PART_WHOLE; Part filler_right_part = PART_WHOLE; |
