summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-05-26 00:51:26 +0200
committerGitHub <noreply@github.com>2022-05-26 00:51:26 +0200
commitaf61ba63fb18fed29c55900b4c85c9f7df730763 (patch)
tree92ef34a790a334433f224e936ecc0f7442ed1560 /core
parent220ee8d942f9b6985ccc1811487d56247e949e39 (diff)
parent77c8f271e7ca8ab6374abdc7470d6a6f6afa18d4 (diff)
downloadredot-engine-af61ba63fb18fed29c55900b4c85c9f7df730763.tar.gz
Merge pull request #61400 from nathanfranke/err-fail-index
use ERR_FAIL_INDEX when preferred
Diffstat (limited to 'core')
-rw-r--r--core/templates/bin_sorted_array.h4
1 files changed, 2 insertions, 2 deletions
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;