mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Merge pull request #72288 from MewPurPur/use-string-repeat
Use `String.repeat()` to optimize several String methods
This commit is contained in:
commit
610877e326
12 changed files with 37 additions and 94 deletions
|
@ -38,12 +38,7 @@
|
|||
#define SL ShaderLanguage
|
||||
|
||||
static String _mktab(int p_level) {
|
||||
String tb;
|
||||
for (int i = 0; i < p_level; i++) {
|
||||
tb += "\t";
|
||||
}
|
||||
|
||||
return tb;
|
||||
return String("\t").repeat(p_level);
|
||||
}
|
||||
|
||||
static String _typestr(SL::DataType p_type) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue