From 70359290aea25fa31604bc2b1e1224823f09d186 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 13 Apr 2023 23:39:59 +0200 Subject: Add const version of add_font_assets(). --- src/interop_subtitle_asset.cc | 10 ++++++++++ src/interop_subtitle_asset.h | 1 + 2 files changed, 11 insertions(+) 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 @@ -263,6 +263,16 @@ InteropSubtitleAsset::add_font_assets (vector>& assets) } +void +InteropSubtitleAsset::add_font_assets(vector>& assets) +{ + for (auto const& i: _fonts) { + DCP_ASSERT (i.file); + assets.push_back (make_shared(i.uuid, i.file.get())); + } +} + + void InteropSubtitleAsset::add_to_assetmap (AssetMap& asset_map, boost::filesystem::path root) const { 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> assets); void add_font_assets (std::vector>& assets); + void add_font_assets(std::vector>& assets); void set_font_file (std::string load_id, boost::filesystem::path file); /** @return the IDs of fonts for which we have not (yet) found a font asset. -- cgit v1.2.3