summaryrefslogtreecommitdiff
path: root/src/lib/subtitle_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-11-17 00:56:28 +0000
committerCarl Hetherington <cth@carlh.net>2013-11-17 00:56:28 +0000
commit39960754026821775e6753a83f6934b8befa0dc2 (patch)
tree8d772c04725d86d9525f511f08062f72a21bef61 /src/lib/subtitle_content.cc
parentf84289fe40cbd5fbf4f139f1c70870787bac7d3a (diff)
More uses of LocaleGuard; hence speculative fix for servers crashing on lexical_cast.
Diffstat (limited to 'src/lib/subtitle_content.cc')
-rw-r--r--src/lib/subtitle_content.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/subtitle_content.cc b/src/lib/subtitle_content.cc
index 9fefbbfcd..1194e2dc9 100644
--- a/src/lib/subtitle_content.cc
+++ b/src/lib/subtitle_content.cc
@@ -19,6 +19,7 @@
#include <libcxml/cxml.h>
#include "subtitle_content.h"
+#include "util.h"
using std::string;
using boost::shared_ptr;
@@ -40,6 +41,8 @@ SubtitleContent::SubtitleContent (shared_ptr<const Film> f, shared_ptr<const cxm
, _subtitle_offset (0)
, _subtitle_scale (1)
{
+ LocaleGuard lg;
+
_subtitle_offset = node->number_child<float> ("SubtitleOffset");
_subtitle_scale = node->number_child<float> ("SubtitleScale");
}
@@ -47,6 +50,8 @@ SubtitleContent::SubtitleContent (shared_ptr<const Film> f, shared_ptr<const cxm
void
SubtitleContent::as_xml (xmlpp::Node* root) const
{
+ LocaleGuard lg;
+
root->add_child("SubtitleOffset")->add_child_text (lexical_cast<string> (_subtitle_offset));
root->add_child("SubtitleScale")->add_child_text (lexical_cast<string> (_subtitle_scale));
}