You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-23 15:16:17 +00:00
Merge pull request #72288 from MewPurPur/use-string-repeat
Use `String.repeat()` to optimize several String methods
This commit is contained in:
@@ -1372,10 +1372,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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user