X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fconfig.cc;h=8e1997325593f6845889bfc6096858593ecfb738;hp=891d832a24c6575a6e4b1130bb149334416e673b;hb=5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f;hpb=4e83acad0c2a5c528709a175a80261b8147d3b49 diff --git a/src/lib/config.cc b/src/lib/config.cc index 891d832a2..8e1997325 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -55,6 +56,7 @@ using std::remove; using std::exception; using std::cerr; using boost::shared_ptr; +using boost::make_shared; using boost::optional; using boost::algorithm::trim; @@ -267,7 +269,7 @@ Config::read () cxml::NodePtr signer = f.optional_node_child ("Signer"); if (signer) { - shared_ptr c (new dcp::CertificateChain ()); + shared_ptr c = make_shared (); /* Read the signing certificates and private key in from the config file */ BOOST_FOREACH (cxml::NodePtr i, signer->node_children ("Certificate")) { c->add (dcp::Certificate (i->content ())); @@ -281,7 +283,7 @@ Config::read () cxml::NodePtr decryption = f.optional_node_child ("Decryption"); if (decryption) { - shared_ptr c (new dcp::CertificateChain ()); + shared_ptr c = make_shared (); BOOST_FOREACH (cxml::NodePtr i, decryption->node_children ("Certificate")) { c->add (dcp::Certificate (i->content ())); } @@ -559,7 +561,7 @@ Config::read_cinemas (cxml::Document const & f) /* Slightly grotty two-part construction of Cinema here so that we can use shared_from_this. */ - shared_ptr cinema (new Cinema (*i)); + shared_ptr cinema = make_shared (*i); cinema->read_screens (*i); _cinemas.push_back (cinema); }