X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp.cc;h=06e3e15d5525408e9dbd62b3ca2d090fcd3c84af;hb=e52d9526f0a49acb72e8b4aa980399b119171ba5;hp=421dbbf83b605fd23efa3aa4278e467af9a69a55;hpb=a5d004b0773f633401528392fc28e66d70e13ac8;p=dcpomatic.git diff --git a/src/lib/dcp.cc b/src/lib/dcp.cc index 421dbbf83..06e3e15d5 100644 --- a/src/lib/dcp.cc +++ b/src/lib/dcp.cc @@ -34,25 +34,27 @@ using std::list; using std::string; using std::shared_ptr; +using std::make_shared; using std::dynamic_pointer_cast; +using std::vector; /** Find all the CPLs in our directories, cross-add assets and return the CPLs */ list > DCP::cpls () const { - list > dcps; - list > cpls; + list> dcps; + list> cpls; LOG_GENERAL ("Reading %1 DCP directories", _dcp_content->directories().size()); for (auto i: _dcp_content->directories()) { - shared_ptr dcp (new dcp::DCP (i)); - list notes; + auto dcp = make_shared(i); + vector notes; dcp->read (¬es, true); if (!_tolerant) { /** We accept and ignore EMPTY_ASSET_PATH and EXTERNAL_ASSET but everything else is bad */ for (auto j: notes) { - if (j.code() == dcp::VerificationNote::EMPTY_ASSET_PATH || j.code() == dcp::VerificationNote::EXTERNAL_ASSET) { + if (j.code() == dcp::VerificationNote::Code::EMPTY_ASSET_PATH || j.code() == dcp::VerificationNote::Code::EXTERNAL_ASSET) { LOG_WARNING("Empty path in ASSETMAP of %1", i.string()); } else { boost::throw_exception(dcp::ReadError(dcp::note_to_string(j)));