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/cinema_kdms.cc | |
| parent | 4e83acad0c2a5c528709a175a80261b8147d3b49 (diff) | |
Use make_shared<>.
Diffstat (limited to 'src/lib/cinema_kdms.cc')
| -rw-r--r-- | src/lib/cinema_kdms.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/cinema_kdms.cc b/src/lib/cinema_kdms.cc index 84cd9c18f..b32da4d6e 100644 --- a/src/lib/cinema_kdms.cc +++ b/src/lib/cinema_kdms.cc @@ -29,6 +29,7 @@ #include "log.h" #include <zip.h> #include <boost/foreach.hpp> +#include <boost/make_shared.hpp> #include "i18n.h" @@ -37,6 +38,7 @@ using std::cout; using std::string; using std::runtime_error; using boost::shared_ptr; +using boost::make_shared; void CinemaKDMs::make_zip_file (string film_name, boost::filesystem::path zip_file) const @@ -53,7 +55,7 @@ CinemaKDMs::make_zip_file (string film_name, boost::filesystem::path zip_file) c list<shared_ptr<string> > kdm_strings; BOOST_FOREACH (ScreenKDM const & i, screen_kdms) { - shared_ptr<string> kdm (new string (i.kdm.as_xml ())); + shared_ptr<string> kdm = boost::make_shared<string> (i.kdm.as_xml ()); kdm_strings.push_back (kdm); struct zip_source* source = zip_source_buffer (zip, kdm->c_str(), kdm->length(), 0); |
