summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-05-04 04:21:17 +0000
committerDavid Robillard <d@drobilla.net>2008-05-04 04:21:17 +0000
commit3775121235a46aa05e18dcf6ba30ef82a74464de (patch)
tree001c3aa0e64c9cfc6c6875c742b4d9e3adfce00f
parent9c0d6de6406bee77c907d7e131b3bf5bcfbd0057 (diff)
downloadraul-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
-rw-r--r--raul/AtomRDF.hpp2
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;