Merge pull request #50044 from akien-mga/localvector-find-noerror

LocalVector: Don't error if `from` >= `count`
This commit is contained in:
Rémi Verschelde 2021-07-01 13:13:27 +02:00 committed by GitHub
commit 9f30638d4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,7 +178,6 @@ public:
}
int64_t find(const T &p_val, U p_from = 0) const {
ERR_FAIL_UNSIGNED_INDEX_V(p_from, count, -1);
for (U i = p_from; i < count; i++) {
if (data[i] == p_val) {
return int64_t(i);