diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-16 12:32:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-16 12:32:04 +0100 |
| commit | 308488324dbc4d8b709d3fb1dc9fee0479346c21 (patch) | |
| tree | 446989a0bea3db683e5200da89c955140b175682 /src/lib/subrip_content.cc | |
| parent | cfdd68eb5fb0ef8423e860103ad4e5510994f1da (diff) | |
| parent | 362ed9ee4f73bee21b3ef8d3b449bb8e8877f501 (diff) | |
Merge master.
Diffstat (limited to 'src/lib/subrip_content.cc')
| -rw-r--r-- | src/lib/subrip_content.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/subrip_content.cc b/src/lib/subrip_content.cc index eb9c67d9a..8f9c28e29 100644 --- a/src/lib/subrip_content.cc +++ b/src/lib/subrip_content.cc @@ -21,12 +21,14 @@ #include "util.h" #include "subrip.h" #include "film.h" +#include <dcp/raw_convert.h> #include "i18n.h" using std::stringstream; using std::string; using std::cout; +using dcp::raw_convert; using boost::shared_ptr; using boost::lexical_cast; @@ -81,12 +83,10 @@ SubRipContent::information () const void SubRipContent::as_xml (xmlpp::Node* node) const { - LocaleGuard lg; - node->add_child("Type")->add_child_text ("SubRip"); Content::as_xml (node); SubtitleContent::as_xml (node); - node->add_child("Length")->add_child_text (lexical_cast<string> (_length.get ())); + node->add_child("Length")->add_child_text (raw_convert<string> (_length.get ())); } DCPTime @@ -101,13 +101,11 @@ SubRipContent::full_length () const string SubRipContent::identifier () const { - LocaleGuard lg; - stringstream s; s << Content::identifier() - << "_" << subtitle_scale() - << "_" << subtitle_x_offset() - << "_" << subtitle_y_offset(); + << "_" << raw_convert<string> (subtitle_scale()) + << "_" << raw_convert<string> (subtitle_x_offset()) + << "_" << raw_convert<string> (subtitle_y_offset()); return s.str (); } |
