diff options
| author | David Snopek <dsnopek@gmail.com> | 2023-10-09 16:59:29 -0500 |
|---|---|---|
| committer | David Snopek <dsnopek@gmail.com> | 2023-10-09 16:59:29 -0500 |
| commit | 3d814f9e4a7d8a3983970928406ed2eba6ac8241 (patch) | |
| tree | 064f1eb4ac9214ba0f17271389317852f5fb3962 /src/variant | |
| parent | ef2f63a00c5496cc325e8546acd743787e87a83d (diff) | |
| download | redot-cpp-3d814f9e4a7d8a3983970928406ed2eba6ac8241.tar.gz | |
Use the new `string_name_new_with_latin1_chars` function to improve StringName construction performance
Diffstat (limited to 'src/variant')
| -rw-r--r-- | src/variant/char_string.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/variant/char_string.cpp b/src/variant/char_string.cpp index fc8845e..a4083bf 100644 --- a/src/variant/char_string.cpp +++ b/src/variant/char_string.cpp @@ -458,8 +458,9 @@ String operator+(char32_t p_char, const String &p_str) { return String::chr(p_char) + p_str; } -StringName::StringName(const char *from) : - StringName(String(from)) {} +StringName::StringName(const char *from, bool p_static) { + internal::gdextension_interface_string_name_new_with_latin1_chars(&opaque, from, p_static); +} StringName::StringName(const wchar_t *from) : StringName(String(from)) {} |
