diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-31 17:37:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-31 17:37:08 +0200 |
commit | 10aec9057c104b493d74dd3e815439abbac3db69 (patch) | |
tree | 827e4ee8584ee74045c7ee0609bf3d8b054ad670 /core/variant | |
parent | f4ec011c29b036d665fcb9c7a09d23f5beee3af3 (diff) | |
parent | 291d3aaabefa86b4e102fa7385bcf7aacd240d72 (diff) |
Merge pull request #63411 from Calinou/improve-null-object-dictionary-print
Improve null and object printing to avoid confusion with arrays
Diffstat (limited to 'core/variant')
-rw-r--r-- | core/variant/variant.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/variant/variant.cpp b/core/variant/variant.cpp index a5bc6c229d..b280fc9fe3 100644 --- a/core/variant/variant.cpp +++ b/core/variant/variant.cpp @@ -1787,7 +1787,7 @@ String stringify_vector(const T &vec, int recursion_count) { String Variant::stringify(int recursion_count) const { switch (type) { case NIL: - return "null"; + return "<null>"; case BOOL: return _data._bool ? "true" : "false"; case INT: @@ -1904,12 +1904,12 @@ String Variant::stringify(int recursion_count) const { case OBJECT: { if (_get_obj().obj) { if (!_get_obj().id.is_ref_counted() && ObjectDB::get_instance(_get_obj().id) == nullptr) { - return "[Freed Object]"; + return "<Freed Object>"; } return _get_obj().obj->to_string(); } else { - return "[Object:null]"; + return "<Object#null>"; } } break; @@ -1926,7 +1926,7 @@ String Variant::stringify(int recursion_count) const { return "RID(" + itos(s.get_id()) + ")"; } break; default: { - return "[" + get_type_name(type) + "]"; + return "<" + get_type_name(type) + ">"; } } |