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

Optimize String::get_data, length and is_empty by making better assumptions and inlining.

This commit is contained in:
Lukas Tenbrink
2025-05-30 09:25:21 +02:00
parent b89c47bb85
commit 70672ef008
2 changed files with 8 additions and 22 deletions

View File

@@ -745,11 +745,6 @@ signed char String::filenocasecmp_to(const String &p_str) const {
return naturalnocasecmp_to_base(this_str, that_str);
}
const char32_t *String::get_data() const {
static const char32_t zero = 0;
return size() ? &operator[](0) : &zero;
}
String String::_separate_compound_words() const {
if (length() == 0) {
return *this;