Skip to content

Commit

Permalink
Merge pull request #1455 from AThousandShips/localvector_has
Browse files Browse the repository at this point in the history
[Core] Add `LocalVector::has` for convenience
  • Loading branch information
dsnopek authored May 7, 2024
2 parents 43be24f + 505076c commit 3d0d9cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/godot_cpp/templates/local_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ class LocalVector {
return -1;
}

bool has(const T &p_val) const {
return find(p_val) != -1;
}

template <typename C>
void sort_custom() {
U len = count;
Expand Down

0 comments on commit 3d0d9cd

Please sign in to comment.