Removed prefixing of doubles between -1 and 1 with 0.

This resulted in values like `00.018` in the AST's NumConstNode which
cannot be read by some JSON readers (e.g. Mathworks' jsondecode).
issue#70
Stéphane Adjemian (Charybdis) 2020-01-27 16:40:25 +01:00
parent bef537d40a
commit 985d742381
Signed by: stepan
GPG Key ID: 295C1FE89E17EB3C
1 changed files with 0 additions and 2 deletions

View File

@ -451,8 +451,6 @@ void
NumConstNode::writeJsonAST(ostream &output) const
{
output << R"({"node_type" : "NumConstNode", "value" : )";
if (double testval = datatree.num_constants.getDouble(id); testval < 1.0 && testval > -1.0 && testval != 0.0)
output << "0";
output << datatree.num_constants.get(id) << "}";
}