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 --- core/templates/bin_sorted_array.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/templates') diff --git a/core/templates/bin_sorted_array.h b/core/templates/bin_sorted_array.h index 59ac4cdaa1..d928bd7a82 100644 --- a/core/templates/bin_sorted_array.h +++ b/core/templates/bin_sorted_array.h @@ -61,7 +61,7 @@ public: } uint64_t move(uint64_t p_idx, uint64_t p_bin) { - ERR_FAIL_COND_V(p_idx >= array.size(), -1); + ERR_FAIL_UNSIGNED_INDEX_V(p_idx, array.size(), -1); uint64_t current_bin = bin_limits.size() - 1; while (p_idx > bin_limits[current_bin]) { @@ -113,7 +113,7 @@ public: } void remove_at(uint64_t p_idx) { - ERR_FAIL_COND(p_idx >= array.size()); + ERR_FAIL_UNSIGNED_INDEX(p_idx, array.size()); uint64_t new_idx = move(p_idx, 0); uint64_t swap_idx = array.size() - 1; -- cgit v1.2.3