Use milo dtoa for consistent string representation of numbers

This commit is contained in:
Eric Fischer
2017-08-29 14:44:34 -07:00
parent 3840176d5c
commit f9a007e8c3
32 changed files with 107 additions and 95 deletions
+2 -5
View File
@@ -5,16 +5,13 @@
#include <vector>
#include <string>
#include <map>
extern "C" {
#include "jsonpull/jsonpull.h"
}
#include "geometry.hpp"
#include "projection.hpp"
#include "read_json.hpp"
#include "text.hpp"
#include "mvt.hpp"
#include "milo/dtoa_milo.h"
const char *geometry_names[GEOM_TYPES] = {
"Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon",
@@ -136,7 +133,7 @@ void stringify_value(json_object *value, int &type, std::string &stringified, co
}
} else if (vt == JSON_NUMBER) {
type = mvt_double;
stringified = val;
stringified = milo::dtoa_milo(value->number);
} else if (vt == JSON_TRUE || vt == JSON_FALSE) {
type = mvt_bool;
stringified = val;