1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Use String.repeat() in more places

This commit is contained in:
VolTer
2023-01-29 00:52:05 +01:00
parent 10d22a4b35
commit 6b84e258d2
12 changed files with 37 additions and 94 deletions

View File

@@ -1353,10 +1353,7 @@ static void _write_string(Ref<FileAccess> f, int p_tablevel, const String &p_str
if (p_string.is_empty()) {
return;
}
String tab;
for (int i = 0; i < p_tablevel; i++) {
tab += "\t";
}
String tab = String("\t").repeat(p_tablevel);
f->store_string(tab + p_string + "\n");
}