#include <boost/algorithm/string.hpp>
#include <boost/foreach.hpp>
#include <boost/thread.hpp>
+#include <boost/make_shared.hpp>
#include <cstdlib>
#include <fstream>
#include <iostream>
using std::exception;
using std::cerr;
using boost::shared_ptr;
+using boost::make_shared;
using boost::optional;
using boost::algorithm::trim;
cxml::NodePtr signer = f.optional_node_child ("Signer");
if (signer) {
- shared_ptr<dcp::CertificateChain> c (new dcp::CertificateChain ());
+ shared_ptr<dcp::CertificateChain> c = make_shared<dcp::CertificateChain> ();
/* 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 ()));
cxml::NodePtr decryption = f.optional_node_child ("Decryption");
if (decryption) {
- shared_ptr<dcp::CertificateChain> c (new dcp::CertificateChain ());
+ shared_ptr<dcp::CertificateChain> c = make_shared<dcp::CertificateChain> ();
BOOST_FOREACH (cxml::NodePtr i, decryption->node_children ("Certificate")) {
c->add (dcp::Certificate (i->content ()));
}
/* Slightly grotty two-part construction of Cinema here so that we can use
shared_from_this.
*/
- shared_ptr<Cinema> cinema (new Cinema (*i));
+ shared_ptr<Cinema> cinema = make_shared<Cinema> (*i);
cinema->read_screens (*i);
_cinemas.push_back (cinema);
}