From 77c8f271e7ca8ab6374abdc7470d6a6f6afa18d4 Mon Sep 17 00:00:00 2001 From: Nathan Franke Date: Wed, 25 May 2022 11:39:00 -0500 Subject: use ERR_FAIL_INDEX when preferred --- modules/openxr/editor/openxr_action_editor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modules/openxr/editor') diff --git a/modules/openxr/editor/openxr_action_editor.cpp b/modules/openxr/editor/openxr_action_editor.cpp index e2a4f67f16..41c6465f43 100644 --- a/modules/openxr/editor/openxr_action_editor.cpp +++ b/modules/openxr/editor/openxr_action_editor.cpp @@ -63,8 +63,7 @@ void OpenXRActionEditor::_on_action_localized_name_changed(const String p_new_te } void OpenXRActionEditor::_on_item_selected(int p_idx) { - ERR_FAIL_COND(p_idx < 0); - ERR_FAIL_COND(p_idx >= OpenXRAction::OPENXR_ACTION_MAX); + ERR_FAIL_INDEX(p_idx, OpenXRAction::OPENXR_ACTION_MAX); action->set_action_type(OpenXRAction::ActionType(p_idx)); } -- cgit v1.2.3