You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Optimize String::chr to avoid calling strlen. Use String::chr instead of String(&chr, 1) where appropriate.
This commit is contained in:
@@ -1626,11 +1626,6 @@ String String::to_lower() const {
|
||||
return lower;
|
||||
}
|
||||
|
||||
String String::chr(char32_t p_char) {
|
||||
char32_t c[2] = { p_char, 0 };
|
||||
return String(c);
|
||||
}
|
||||
|
||||
String String::num(double p_num, int p_decimals) {
|
||||
if (Math::is_nan(p_num)) {
|
||||
return "nan";
|
||||
|
||||
Reference in New Issue
Block a user