Use make_shared<>.
[dcpomatic.git] / src / lib / image_content.cc
index e26eed3d021f4bcaf2bc415d97e17ac56f980f9c..ca8bd380f1c6259821a46129e84ca684cda830b1 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 #include <libcxml/cxml.h>
 #include <libxml++/libxml++.h>
 #include <boost/foreach.hpp>
+#include <boost/make_shared.hpp>
 #include <iostream>
 
 #include "i18n.h"
 
 using std::string;
 using std::cout;
+using std::list;
 using boost::shared_ptr;
+using boost::make_shared;
 
 ImageContent::ImageContent (shared_ptr<const Film> film, boost::filesystem::path p)
        : Content (film)
@@ -118,7 +121,7 @@ ImageContent::examine (shared_ptr<Job> job)
        shared_ptr<const Film> film = _film.lock ();
        DCPOMATIC_ASSERT (film);
 
-       shared_ptr<ImageExaminer> examiner (new ImageExaminer (film, shared_from_this(), job));
+       shared_ptr<ImageExaminer> examiner = make_shared<ImageExaminer> (film, shared_from_this(), job);
        video->take_from_examiner (examiner);
        set_default_colour_conversion ();
 }
@@ -169,3 +172,10 @@ ImageContent::set_default_colour_conversion ()
                video->set_colour_conversion (PresetColourConversion::from_id ("rec709").conversion);
        }
 }
+
+void
+ImageContent::add_properties (list<UserProperty>& p) const
+{
+       Content::add_properties (p);
+       video->add_properties (p);
+}