Use unused from in local vector find function.

(cherry picked from commit 14d5908057)
This commit is contained in:
Ricard Rovira 2021-06-29 13:37:02 +02:00 committed by Rémi Verschelde
parent 48fe8da245
commit 84474c0e6f
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 1 deletions

View File

@ -177,7 +177,8 @@ public:
}
int64_t find(const T &p_val, U p_from = 0) const {
for (U i = 0; i < count; i++) {
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);
}