diff options
| -rw-r--r-- | src/interop_subtitle_asset.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/interop_subtitle_asset.cc b/src/interop_subtitle_asset.cc index 32c3f66a..eaf2ceaf 100644 --- a/src/interop_subtitle_asset.cc +++ b/src/interop_subtitle_asset.cc @@ -192,30 +192,30 @@ InteropSubtitleAsset::load_font_nodes () const void -InteropSubtitleAsset::write (boost::filesystem::path p) const +InteropSubtitleAsset::write(boost::filesystem::path path) const { - File f(p, "wb"); - if (!f) { - throw FileError ("Could not open file for writing", p, -1); + File file(path, "wb"); + if (!file) { + throw FileError("Could not open file for writing", path, -1); } _raw_xml = xml_as_string (); /* length() here gives bytes not characters */ - f.write(_raw_xml->c_str(), 1, _raw_xml->length()); + file.write(_raw_xml->c_str(), 1, _raw_xml->length()); - _file = p; + _file = path; /* Image subtitles */ for (auto i: _subtitles) { auto im = dynamic_pointer_cast<dcp::SubtitleImage> (i); if (im) { - im->write_png_file(p.parent_path() / String::compose("%1.png", im->id())); + im->write_png_file(path.parent_path() / String::compose("%1.png", im->id())); } } /* Fonts */ for (auto i: _load_font_nodes) { - auto file = p.parent_path() / i->uri; + auto file = path.parent_path() / i->uri; auto font_with_id = std::find_if(_fonts.begin(), _fonts.end(), [i](Font const& font) { return font.load_id == i->id; }); if (font_with_id != _fonts.end()) { font_with_id->data.write(file); |
