diff options
author | David Robillard <d@drobilla.net> | 2008-05-04 04:21:17 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-05-04 04:21:17 +0000 |
commit | 3775121235a46aa05e18dcf6ba30ef82a74464de (patch) | |
tree | 001c3aa0e64c9cfc6c6875c742b4d9e3adfce00f /raul | |
parent | 9c0d6de6406bee77c907d7e131b3bf5bcfbd0057 (diff) | |
download | raul-3775121235a46aa05e18dcf6ba30ef82a74464de.tar.gz raul-3775121235a46aa05e18dcf6ba30ef82a74464de.tar.bz2 raul-3775121235a46aa05e18dcf6ba30ef82a74464de.zip |
Fix serialisation of floating point variables (fixes module positioning).
git-svn-id: http://svn.drobilla.net/lad/raul@1200 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'raul')
-rw-r--r-- | raul/AtomRDF.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/raul/AtomRDF.hpp b/raul/AtomRDF.hpp index 84e8287..10e3444 100644 --- a/raul/AtomRDF.hpp +++ b/raul/AtomRDF.hpp @@ -76,6 +76,8 @@ atom_to_node(Redland::World& world, const Atom& atom) os.precision(20); os << atom.get_float(); str = os.str(); + if (str.find(".") == std::string::npos) + str += ".0"; // xsd:decimal -> pretty decimal (float) literals in Turtle type = librdf_new_uri(world.world(), CUC("http://www.w3.org/2001/XMLSchema#decimal")); break; |