diff options
author | David Robillard <d@drobilla.net> | 2011-12-21 23:29:13 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-12-21 23:29:13 +0000 |
commit | 68f185bfc1140da7c402d4e1100ee71267789b60 (patch) | |
tree | e9c7731b39690db61b5f729c1047eac7f0b12ef3 /sord | |
parent | fa5c2b8210ecf22004b27eb8b8de17cfc1ec48f2 (diff) | |
download | sord-68f185bfc1140da7c402d4e1100ee71267789b60.tar.gz sord-68f185bfc1140da7c402d4e1100ee71267789b60.tar.bz2 sord-68f185bfc1140da7c402d4e1100ee71267789b60.zip |
Remove locale kludges.
git-svn-id: http://svn.drobilla.net/sord/trunk@183 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'sord')
-rw-r--r-- | sord/sordmm.hpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sord/sordmm.hpp b/sord/sordmm.hpp index 8e352d4..cbb5460 100644 --- a/sord/sordmm.hpp +++ b/sord/sordmm.hpp @@ -330,24 +330,16 @@ inline int Node::to_int() const { assert(is_int()); - std::locale c_locale("C"); - std::stringstream ss((const char*)sord_node_get_string(_c_obj)); - ss.imbue(c_locale); - int i = 0; - ss >> i; - return i; + char* endptr; + return strtol((const char*)sord_node_get_string(_c_obj), &endptr, 10); } inline float Node::to_float() const { assert(is_float()); - std::locale c_locale("C"); - std::stringstream ss((const char*)sord_node_get_string(_c_obj)); - ss.imbue(c_locale); - float f = 0.0f; - ss >> f; - return f; + char* endptr; + return serd_strtod((const char*)sord_node_get_string(_c_obj), &endptr); } inline bool |