diff options
author | David Robillard <d@drobilla.net> | 2007-06-23 22:45:08 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-06-23 22:45:08 +0000 |
commit | 51918d8e3743d178bba2dbd788c8a5c3fc7cc3bc (patch) | |
tree | bb062ba7557f88da80d2e6427f5d67f077b7643b /src | |
parent | 4f3671892be72cdd39b1a9e76f7cd4d9962f40c0 (diff) | |
download | ingen-51918d8e3743d178bba2dbd788c8a5c3fc7cc3bc.tar.gz ingen-51918d8e3743d178bba2dbd788c8a5c3fc7cc3bc.tar.bz2 ingen-51918d8e3743d178bba2dbd788c8a5c3fc7cc3bc.zip |
Possible fix for serialisation in locales with , as decimal point.
git-svn-id: http://svn.drobilla.net/lad/ingen@540 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/libs/client/Serializer.cpp | 5 | ||||
-rw-r--r-- | src/libs/engine/Tree.h | 12 | ||||
-rw-r--r-- | src/libs/serialisation/Loader.cpp | 3 |
3 files changed, 11 insertions, 9 deletions
diff --git a/src/libs/client/Serializer.cpp b/src/libs/client/Serializer.cpp index 4a746ae1..92b0ad41 100644 --- a/src/libs/client/Serializer.cpp +++ b/src/libs/client/Serializer.cpp @@ -27,6 +27,7 @@ #include <cstdlib> // atof #include <boost/optional/optional.hpp> #include <cstring> +#include <locale.h> #include <raul/RDFWorld.h> #include <raul/RDFModel.h> #include <raul/RDFNode.h> @@ -64,6 +65,8 @@ Serializer::Serializer(Raul::RDF::World& world) void Serializer::start_to_filename(const string& filename) { + setlocale(LC_NUMERIC, "C"); + _base_uri = "file://" + filename; _model = new RDF::Model(_world); _mode = TO_FILE; @@ -81,6 +84,8 @@ Serializer::start_to_filename(const string& filename) void Serializer::start_to_string() { + setlocale(LC_NUMERIC, "C"); + _base_uri = ""; _model = new RDF::Model(_world); _mode = TO_STRING; diff --git a/src/libs/engine/Tree.h b/src/libs/engine/Tree.h index 2c89e55c..cba23776 100644 --- a/src/libs/engine/Tree.h +++ b/src/libs/engine/Tree.h @@ -15,8 +15,8 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef NODETREE_H -#define NODETREE_H +#ifndef TREE_H +#define TREE_H #include <string> #include <cassert> @@ -138,10 +138,4 @@ private: }; -/* This needs to be done so the templates are defined and can get instantiated - * automatically by the compilter. - */ -//#include "TreeImplementation.h" - - -#endif // NODETREE_H +#endif // TREE_H diff --git a/src/libs/serialisation/Loader.cpp b/src/libs/serialisation/Loader.cpp index 157756b1..25747d8d 100644 --- a/src/libs/serialisation/Loader.cpp +++ b/src/libs/serialisation/Loader.cpp @@ -16,6 +16,7 @@ */ #include <iostream> +#include <locale.h> #include <glibmm/ustring.h> #include <raul/RDFModel.h> #include <raul/RDFQuery.h> @@ -45,6 +46,8 @@ Loader::load(SharedPtr<EngineInterface> engine, Glib::ustring patch_uri, map<string,Atom> data) { + setlocale(LC_NUMERIC, "C"); + // FIXME: this whole thing is a mess std::map<Path, bool> created; |