diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-12 00:57:51 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-12 00:57:51 +0100 |
| commit | df085fc0ea4f1a3f009de5a7a5bf9f241173bcba (patch) | |
| tree | 597ff1fe90446aa684e5fede3a72217b0b5c3d1a /src/lib/content.cc | |
| parent | 1b576d63f5b5babda35c3995dd375e39baa16947 (diff) | |
Remove LocaleGuard and lexical_cast<> in favour of libdcp::raw_convert,
which should get things right with both decimal and thousands
separators; LocaleGuard fixed decimal separators ok but not, it appears,
thousands ones.
Diffstat (limited to 'src/lib/content.cc')
| -rw-r--r-- | src/lib/content.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc index 829468247..1ec607d39 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -20,6 +20,7 @@ #include <boost/thread/mutex.hpp> #include <libxml++/libxml++.h> #include <libcxml/cxml.h> +#include <libdcp/raw_convert.h> #include "content.h" #include "util.h" #include "content_factory.h" @@ -36,7 +37,7 @@ using std::list; using std::cout; using std::vector; using boost::shared_ptr; -using boost::lexical_cast; +using libdcp::raw_convert; int const ContentProperty::PATH = 400; int const ContentProperty::POSITION = 401; @@ -119,9 +120,9 @@ Content::as_xml (xmlpp::Node* node) const node->add_child("Path")->add_child_text (i->string ()); } node->add_child("Digest")->add_child_text (_digest); - node->add_child("Position")->add_child_text (lexical_cast<string> (_position)); - node->add_child("TrimStart")->add_child_text (lexical_cast<string> (_trim_start)); - node->add_child("TrimEnd")->add_child_text (lexical_cast<string> (_trim_end)); + node->add_child("Position")->add_child_text (raw_convert<string> (_position)); + node->add_child("TrimStart")->add_child_text (raw_convert<string> (_trim_start)); + node->add_child("TrimEnd")->add_child_text (raw_convert<string> (_trim_end)); } void |
