about summary refs log tree commit diff
path: root/src/libutil/json.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-07-03T16·04+0200
committerEelco Dolstra <edolstra@gmail.com>2018-07-03T16·39+0200
commita92ed973e569324b55cddb128f6f638f3ea1985c (patch)
tree53d8d28c233ed213d09afc63d5118bac5284f79b /src/libutil/json.cc
parent91f49ca1086b43a55e08dfccf1c49eb512a2abc9 (diff)
Store floating point numbers in double precision
Even on 32-bit systems, Value has enough space to hold a double.
Diffstat (limited to 'src/libutil/json.cc')
-rw-r--r--src/libutil/json.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libutil/json.cc b/src/libutil/json.cc
index 813b257016e4..0a6fb65f0605 100644
--- a/src/libutil/json.cc
+++ b/src/libutil/json.cc
@@ -31,6 +31,7 @@ template<> void toJSON<unsigned long>(std::ostream & str, const unsigned long &
 template<> void toJSON<long long>(std::ostream & str, const long long & n) { str << n; }
 template<> void toJSON<unsigned long long>(std::ostream & str, const unsigned long long & n) { str << n; }
 template<> void toJSON<float>(std::ostream & str, const float & n) { str << n; }
+template<> void toJSON<double>(std::ostream & str, const double & n) { str << n; }
 
 template<> void toJSON<std::string>(std::ostream & str, const std::string & s)
 {