Optimize String::get_data, length and is_empty by making better assumptions and inlining.
This commit is contained in:
parent
b89c47bb85
commit
70672ef008
2 changed files with 8 additions and 22 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue