Use make_shared<>.
[dcpomatic.git] / src / lib / text_subtitle_content.cc
index 24a328d088e3c05001f9be31f2f1b614233010da..ea56ac7bb0c9d531f19e8e96cae29ff9fb2e80b4 100644 (file)
@@ -26,6 +26,7 @@
 #include "raw_convert.h"
 #include "subtitle_content.h"
 #include <libxml++/libxml++.h>
+#include <boost/make_shared.hpp>
 #include <iostream>
 
 #include "i18n.h"
@@ -33,6 +34,7 @@
 using std::string;
 using std::cout;
 using boost::shared_ptr;
+using boost::make_shared;
 
 TextSubtitleContent::TextSubtitleContent (shared_ptr<const Film> film, boost::filesystem::path path)
        : Content (film, path)
@@ -58,7 +60,7 @@ TextSubtitleContent::examine (boost::shared_ptr<Job> job)
 
        boost::mutex::scoped_lock lm (_mutex);
        _length = s.length ();
-       subtitle->add_font (shared_ptr<Font> (new Font (TEXT_FONT_ID)));
+       subtitle->add_font (make_shared<Font> (TEXT_FONT_ID));
 }
 
 string