Add const version of add_font_assets().
authorCarl Hetherington <cth@carlh.net>
Thu, 13 Apr 2023 21:39:59 +0000 (23:39 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 13 Apr 2023 21:39:59 +0000 (23:39 +0200)
src/interop_subtitle_asset.cc
src/interop_subtitle_asset.h

index 24cd907da00ccb9d42ebebb067840b32e339c6c4..0faf7bd5330c15f47335e3e25ad0d22e3eb3d2bf 100644 (file)
@@ -263,6 +263,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
 {
index 467728dbcba8c46cae3a815fcf50e0d73155af85..72d862ad9587f8944cf602ab7491cacaf8bd91fe 100644 (file)
@@ -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.