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

Use get_slicec instead of get_slice for single character splitters

This commit is contained in:
A Thousand Ships
2024-11-16 17:16:07 +01:00
parent b5bdb88062
commit 466590d0ec
58 changed files with 210 additions and 210 deletions

View File

@@ -238,7 +238,7 @@ void PropertySelector::_update_search() {
continue;
}
String name = mi.name.get_slice(":", 0);
String name = mi.name.get_slicec(':', 0);
if (!script_methods && name.begins_with("_") && !(mi.flags & METHOD_FLAG_VIRTUAL)) {
continue;
}
@@ -259,8 +259,8 @@ void PropertySelector::_update_search() {
String desc;
if (mi.name.contains_char(':')) {
desc = mi.name.get_slice(":", 1) + " ";
mi.name = mi.name.get_slice(":", 0);
desc = mi.name.get_slicec(':', 1) + " ";
mi.name = mi.name.get_slicec(':', 0);
} else if (mi.return_val.type != Variant::NIL) {
desc = Variant::get_type_name(mi.return_val.type);
} else {
@@ -279,8 +279,8 @@ void PropertySelector::_update_search() {
if (arg_itr->type == Variant::NIL) {
desc += ": Variant";
} else if (arg_itr->name.contains_char(':')) {
desc += vformat(": %s", arg_itr->name.get_slice(":", 1));
arg_itr->name = arg_itr->name.get_slice(":", 0);
desc += vformat(": %s", arg_itr->name.get_slicec(':', 1));
arg_itr->name = arg_itr->name.get_slicec(':', 0);
} else {
desc += vformat(": %s", Variant::get_type_name(arg_itr->type));
}