diff options
Diffstat (limited to 'json')
-rw-r--r-- | json/jsonwrite.cc | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/json/jsonwrite.cc b/json/jsonwrite.cc index 477bfca5..d4a62a5a 100644 --- a/json/jsonwrite.cc +++ b/json/jsonwrite.cc @@ -45,15 +45,6 @@ std::string get_string(std::string str) std::string get_name(IdString name, Context *ctx) { return get_string(name.c_str(ctx)); } -void write_parameter_value(std::ostream &f, const Property &value) -{ - if (value.size() == 32 && value.is_fully_def()) { - f << stringf("%d", value.as_int64()); - } else { - f << get_string(value.to_string()); - } -} - void write_parameters(std::ostream &f, Context *ctx, const std::unordered_map<IdString, Property> ¶meters, bool for_module = false) { @@ -61,7 +52,7 @@ void write_parameters(std::ostream &f, Context *ctx, const std::unordered_map<Id for (auto ¶m : parameters) { f << stringf("%s\n", first ? "" : ","); f << stringf(" %s%s: ", for_module ? "" : " ", get_name(param.first, ctx).c_str()); - write_parameter_value(f, param.second); + f << get_string(param.second.to_string()); first = false; } } |