From be5d6b54ffbc96c2b7823356c0b79583784ca91d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 19 Mar 2019 21:22:23 +0000 Subject: Add some more conversions. --- src/cxml.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/cxml.cc') diff --git a/src/cxml.cc b/src/cxml.cc index 82e4bc3..78f75ee 100644 --- a/src/cxml.cc +++ b/src/cxml.cc @@ -330,6 +330,15 @@ locale_convert (string x) return y; } +template<> +long int +locale_convert (string x) +{ + long int y = 0; + sscanf (x.c_str(), "%ld", &y); + return y; +} + template<> float locale_convert (string x) @@ -355,6 +364,13 @@ cxml::raw_convert (string v) return locale_convert (make_local(v)); } +template <> +long int +cxml::raw_convert (string v) +{ + return locale_convert (make_local(v)); +} + template <> float cxml::raw_convert (string v) -- cgit v1.2.3