mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #106309 from aaronp64/string_chr_appends
Avoid single character `String` allocations when appending characters
This commit is contained in:
commit
620206b0ae
3 changed files with 9 additions and 6 deletions
|
|
@ -1757,7 +1757,7 @@ Error VariantParser::_parse_tag(Token &token, Stream *p_stream, int &line, Strin
|
|||
} else {
|
||||
escaping = false;
|
||||
}
|
||||
r_tag.name += String::chr(c);
|
||||
r_tag.name += c;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1902,7 +1902,7 @@ Error VariantParser::parse_tag_assign_eof(Stream *p_stream, int &line, String &r
|
|||
what = tk.value;
|
||||
|
||||
} else if (c != '=') {
|
||||
what += String::chr(c);
|
||||
what += c;
|
||||
} else {
|
||||
r_assign = what;
|
||||
Token token;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue