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

Add contains_char() for single-character 'contains' calls.

This commit is contained in:
Lukas Tenbrink
2024-12-05 17:56:08 +01:00
parent eb5103093c
commit b5c31ebb41
61 changed files with 108 additions and 99 deletions

View File

@@ -1618,7 +1618,7 @@ void AnimationNodeStateMachineEditor::_open_editor(const String &p_name) {
void AnimationNodeStateMachineEditor::_name_edited(const String &p_text) {
const String &new_name = p_text;
ERR_FAIL_COND(new_name.is_empty() || new_name.contains(".") || new_name.contains("/"));
ERR_FAIL_COND(new_name.is_empty() || new_name.contains_char('.') || new_name.contains_char('/'));
if (new_name == prev_name) {
return; // Nothing to do.