Skip to content

Commit 3d0d9cd

Browse files
authored
Merge pull request #1455 from AThousandShips/localvector_has
[Core] Add `LocalVector::has` for convenience
2 parents 43be24f + 505076c commit 3d0d9cd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/godot_cpp/templates/local_vector.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ class LocalVector {
257257
return -1;
258258
}
259259

260+
bool has(const T &p_val) const {
261+
return find(p_val) != -1;
262+
}
263+
260264
template <typename C>
261265
void sort_custom() {
262266
U len = count;

0 commit comments

Comments
 (0)