diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-24 04:15:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-24 04:15:26 +0100 |
| commit | ceaf7bc52712cb60708ed5eb5c62c5e463dd8e89 (patch) | |
| tree | c55e4b85ee30138ce83263045d77d01631378b2e /src/combine.cc | |
| parent | 6c37cc1979b2a01205a888c4c98f3334685ee8dd (diff) | |
Tidying.
Diffstat (limited to 'src/combine.cc')
| -rw-r--r-- | src/combine.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/combine.cc b/src/combine.cc index c2cae547..dd8a145c 100644 --- a/src/combine.cc +++ b/src/combine.cc @@ -32,6 +32,11 @@ */ +/** @file src/combine.cc + * @brief Method to combine DCPs + */ + + #include "asset.h" #include "combine.h" #include "cpl.h" @@ -135,27 +140,27 @@ dcp::combine ( continue; } - optional<path> file = j->file(); + auto file = j->file(); DCP_ASSERT (file); path new_path = make_unique(output / file->filename()); - shared_ptr<dcp::InteropSubtitleAsset> sub = dynamic_pointer_cast<dcp::InteropSubtitleAsset>(j); + auto sub = dynamic_pointer_cast<dcp::InteropSubtitleAsset>(j); if (sub) { /* Interop fonts are really fiddly. The font files are assets (in the ASSETMAP) * and also linked from the font XML by filename. We have to fix both these things, * and re-write the font XML file since the font URI might have changed if it's a duplicate * with another DCP. */ - map<string, path> fonts = sub->font_filenames (); - for (map<string, path>::const_iterator k = fonts.begin(); k != fonts.end(); ++k) { - sub->set_font_file (k->first, make_unique(output / k->second.filename())); + auto fonts = sub->font_filenames (); + for (auto const& k: fonts) { + sub->set_font_file (k.first, make_unique(output / k.second.filename())); } sub->write (new_path); } else if (!dynamic_pointer_cast<dcp::FontAsset>(j)) { /* Take care of everything else that's not a Interop subtitle asset, Interop font file * or CPL. */ - optional<path> file = j->file(); + auto file = j->file(); DCP_ASSERT (file); path new_path = make_unique(output / file->filename()); create_hard_link_or_copy (*file, new_path); |
