diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-04-13 23:39:59 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-04-13 23:39:59 +0200 |
| commit | 70359290aea25fa31604bc2b1e1224823f09d186 (patch) | |
| tree | d430a10d7de38469837faa6ea5bd78c315b766ae /src | |
| parent | 776836d2700123f8a0f109d3a2ac00fad5cdfd48 (diff) | |
Add const version of add_font_assets().
Diffstat (limited to 'src')
| -rw-r--r-- | src/interop_subtitle_asset.cc | 10 | ||||
| -rw-r--r-- | src/interop_subtitle_asset.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/interop_subtitle_asset.cc b/src/interop_subtitle_asset.cc index 24cd907d..0faf7bd5 100644 --- a/src/interop_subtitle_asset.cc +++ b/src/interop_subtitle_asset.cc @@ -264,6 +264,16 @@ InteropSubtitleAsset::add_font_assets (vector<shared_ptr<Asset>>& assets) void +InteropSubtitleAsset::add_font_assets(vector<shared_ptr<const Asset>>& assets) +{ + for (auto const& i: _fonts) { + DCP_ASSERT (i.file); + assets.push_back (make_shared<FontAsset>(i.uuid, i.file.get())); + } +} + + +void InteropSubtitleAsset::add_to_assetmap (AssetMap& asset_map, boost::filesystem::path root) const { Asset::add_to_assetmap(asset_map, root); diff --git a/src/interop_subtitle_asset.h b/src/interop_subtitle_asset.h index 467728db..72d862ad 100644 --- a/src/interop_subtitle_asset.h +++ b/src/interop_subtitle_asset.h @@ -83,6 +83,7 @@ public: void resolve_fonts (std::vector<std::shared_ptr<Asset>> assets); void add_font_assets (std::vector<std::shared_ptr<Asset>>& assets); + void add_font_assets(std::vector<std::shared_ptr<const Asset>>& assets); void set_font_file (std::string load_id, boost::filesystem::path file); /** @return the <LoadFont> IDs of fonts for which we have not (yet) found a font asset. |
