Improve usage of String.split() vs get_slice()

This commit is contained in:
kobewi
2023-09-27 22:37:24 +02:00
parent 2753d333f6
commit d61a337a70
17 changed files with 45 additions and 50 deletions

View File

@ -1534,9 +1534,7 @@ bool AnimationNodeStateMachine::_can_connect(const StringName &p_name) {
}
String node_name = p_name;
Vector<String> path = node_name.split("/");
if (path.size() < 2) {
if (node_name.get_slice_count("/") < 2) {
return false;
}