diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-10-09 18:42:23 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-10-09 18:42:23 +0100 |
| commit | eaece234969e2d3cb784df764a0dc766eeff2099 (patch) | |
| tree | 72d8fea96f6b033fbbcef4480964c76f73ca3bae | |
| parent | c9530d613712f2ae5e6bbb14f4a329a4dd04e139 (diff) | |
Remove glibmm dependency.
| -rw-r--r-- | src/interop_subtitle_asset.cc | 7 | ||||
| -rw-r--r-- | src/interop_subtitle_asset.h | 2 | ||||
| -rw-r--r-- | src/smpte_subtitle_asset.cc | 2 | ||||
| -rw-r--r-- | src/smpte_subtitle_asset.h | 2 | ||||
| -rw-r--r-- | src/subtitle_asset.h | 2 |
5 files changed, 8 insertions, 7 deletions
diff --git a/src/interop_subtitle_asset.cc b/src/interop_subtitle_asset.cc index c6479612..bf493fda 100644 --- a/src/interop_subtitle_asset.cc +++ b/src/interop_subtitle_asset.cc @@ -66,7 +66,7 @@ InteropSubtitleAsset::InteropSubtitleAsset () } -Glib::ustring +string InteropSubtitleAsset::xml_as_string () const { xmlpp::Document doc; @@ -151,8 +151,9 @@ InteropSubtitleAsset::write (boost::filesystem::path p) const throw FileError ("Could not open file for writing", p, -1); } - Glib::ustring const s = xml_as_string (); - fwrite (s.c_str(), 1, s.bytes(), f); + string const s = xml_as_string (); + /* length() here gives bytes not characters */ + fwrite (s.c_str(), 1, s.length(), f); fclose (f); _file = p; diff --git a/src/interop_subtitle_asset.h b/src/interop_subtitle_asset.h index 8690d11c..fe38a0c9 100644 --- a/src/interop_subtitle_asset.h +++ b/src/interop_subtitle_asset.h @@ -49,7 +49,7 @@ public: void add_font (std::string load_id, boost::filesystem::path file); - Glib::ustring xml_as_string () const; + std::string xml_as_string () const; void write (boost::filesystem::path path) const; void resolve_fonts (std::list<boost::shared_ptr<Object> > objects); void add_font_assets (std::list<boost::shared_ptr<Asset> >& assets); diff --git a/src/smpte_subtitle_asset.cc b/src/smpte_subtitle_asset.cc index 43fa3026..130b344f 100644 --- a/src/smpte_subtitle_asset.cc +++ b/src/smpte_subtitle_asset.cc @@ -183,7 +183,7 @@ SMPTESubtitleAsset::valid_mxf (boost::filesystem::path file) return !ASDCP_FAILURE (r); } -Glib::ustring +string SMPTESubtitleAsset::xml_as_string () const { xmlpp::Document doc; diff --git a/src/smpte_subtitle_asset.h b/src/smpte_subtitle_asset.h index 23c0e948..a7adee6f 100644 --- a/src/smpte_subtitle_asset.h +++ b/src/smpte_subtitle_asset.h @@ -56,7 +56,7 @@ public: std::list<boost::shared_ptr<LoadFontNode> > load_font_nodes () const; - Glib::ustring xml_as_string () const; + std::string xml_as_string () const; void write (boost::filesystem::path path) const; void add (SubtitleString); void add_font (std::string id, boost::filesystem::path file); diff --git a/src/subtitle_asset.h b/src/subtitle_asset.h index 27b1bb32..8e9f56d5 100644 --- a/src/subtitle_asset.h +++ b/src/subtitle_asset.h @@ -73,7 +73,7 @@ public: std::map<std::string, Data> fonts_with_load_ids () const; virtual void write (boost::filesystem::path) const = 0; - virtual Glib::ustring xml_as_string () const = 0; + virtual std::string xml_as_string () const = 0; Time latest_subtitle_out () const; |
