From 3775121235a46aa05e18dcf6ba30ef82a74464de Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 4 May 2008 04:21:17 +0000 Subject: Fix serialisation of floating point variables (fixes module positioning). git-svn-id: http://svn.drobilla.net/lad/raul@1200 a436a847-0d15-0410-975c-d299462d15a1 --- raul/AtomRDF.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'raul') 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; -- cgit v1.2.1