You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Use Grisu2 algorithm in String::num_scientific to fix serializing
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "core/config/engine.h"
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/core_constants.h"
|
||||
#include "core/doc_data.h"
|
||||
#include "core/io/compression.h"
|
||||
#include "core/io/dir_access.h"
|
||||
#include "core/io/resource_importer.h"
|
||||
@@ -930,7 +931,7 @@ void DocTools::generate(BitField<GenerateFlags> p_flags) {
|
||||
DocData::ConstantDoc constant;
|
||||
constant.name = E;
|
||||
Variant value = Variant::get_constant_value(Variant::Type(i), E);
|
||||
constant.value = value.get_type() == Variant::INT ? itos(value) : value.get_construct_string().replace_char('\n', ' ');
|
||||
constant.value = DocData::get_default_value_string(value);
|
||||
constant.is_value_valid = true;
|
||||
constant.type = Variant::get_type_name(value.get_type());
|
||||
c.constants.push_back(constant);
|
||||
|
||||
Reference in New Issue
Block a user