From a0dbdcc3abbd3e6307c6e68d0e60f8c0fa31d576 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Mon, 6 May 2024 16:20:20 +0200 Subject: Replace `find` with `contains/has` where applicable * Replaces `find(...) != -1` with `contains` for `String` * Replaces `find(...) == -1` with `!contains` for `String` * Replaces `find(...) != -1` with `has` for containers * Replaces `find(...) == -1` with `!has` for containers --- modules/openxr/action_map/openxr_action_set.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/openxr/action_map/openxr_action_set.cpp') diff --git a/modules/openxr/action_map/openxr_action_set.cpp b/modules/openxr/action_map/openxr_action_set.cpp index 4855f9e4b7..d583af2b2f 100644 --- a/modules/openxr/action_map/openxr_action_set.cpp +++ b/modules/openxr/action_map/openxr_action_set.cpp @@ -124,7 +124,7 @@ Ref OpenXRActionSet::get_action(const String p_name) const { void OpenXRActionSet::add_action(Ref p_action) { ERR_FAIL_COND(p_action.is_null()); - if (actions.find(p_action) == -1) { + if (!actions.has(p_action)) { if (p_action->action_set && p_action->action_set != this) { // action should only relate to our action set p_action->action_set->remove_action(p_action); -- cgit v1.2.3