You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Use String.repeat() in more places
This commit is contained in:
@@ -47,13 +47,7 @@ const char *JSON::tk_name[TK_MAX] = {
|
||||
};
|
||||
|
||||
String JSON::_make_indent(const String &p_indent, int p_size) {
|
||||
String indent_text = "";
|
||||
if (!p_indent.is_empty()) {
|
||||
for (int i = 0; i < p_size; i++) {
|
||||
indent_text += p_indent;
|
||||
}
|
||||
}
|
||||
return indent_text;
|
||||
return p_indent.repeat(p_size);
|
||||
}
|
||||
|
||||
String JSON::_stringify(const Variant &p_var, const String &p_indent, int p_cur_indent, bool p_sort_keys, HashSet<const void *> &p_markers, bool p_full_precision) {
|
||||
|
||||
Reference in New Issue
Block a user